Permalink
Browse files

Fix #466, leak of memory after call pq

Revealed by sequence from test 321:
INSERT INTO pq VALUES ( 'test' );
CALL PQ ('pq', 'test 1', 1 as docs, 0 as docs_json );

(RAM segment is created during call, and not deleted at the end)
  • Loading branch information...
klirichek committed Sep 11, 2018
1 parent 21bcc6d commit 39e5bc3751b7295222eb76407c5d72ce1dad545b
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/sphinxrt.cpp
@@ -11879,6 +11879,7 @@ bool PercolateIndex_c::MatchDocuments ( ISphRtAccum * pAccExt, PercolateMatchRes
BuildSegmentInfixes ( pSeg, m_pDict->HasMorphology(), true, m_tSettings.m_iMinInfixLen, PERCOLATE_WORDS_PER_CP, ( m_iMaxCodepointLength>1 ) );
DoMatchDocuments ( pSeg, tRes );
SafeDelete ( pSeg );
// done; cleanup accum
pAcc->m_dAccum.Resize ( 0 );

0 comments on commit 39e5bc3

Please sign in to comment.