Skip to content
Permalink
Browse files

fixed #351 memory leak on query with JSON filter

  • Loading branch information
tomatolog committed Aug 7, 2018
1 parent 4c33764 commit b5ea8dc0b18a23dbd739e92c66dd93b0094df14b
Showing with 2 additions and 12 deletions.
  1. +2 −12 src/sphinxexpr.cpp
@@ -1235,16 +1235,7 @@ struct Expr_JsonFieldConv_c : public ISphExpr
public:
explicit Expr_JsonFieldConv_c ( ISphExpr * pArg )
: m_pArg { pArg }
{
if ( pArg )
pArg->AddRef ();
}

~Expr_JsonFieldConv_c() override
{
SafeRelease ( m_pArg ); // once - sync with addref
SafeRelease ( m_pArg ); // secondary - release ownership
}
{}

int StringEval ( const CSphMatch & tMatch, const BYTE ** ppStr ) const override
{
@@ -1279,8 +1270,7 @@ struct Expr_JsonFieldConv_c : public ISphExpr

protected:
const BYTE * m_pStrings = nullptr;
ISphExpr * m_pArg;

CSphRefcountedPtr<ISphExpr> m_pArg;

ESphJsonType GetKey ( const BYTE ** ppKey, const CSphMatch & tMatch ) const
{

0 comments on commit b5ea8dc

Please sign in to comment.
You can’t perform that action at this time.