Permalink
Browse files

Fix #374 mem-leak of parsed agent descriptors on config load

  • Loading branch information...
klirichek committed Aug 14, 2018
1 parent cad9b9c commit 90008cc15c4684d445d37a391bb4a667bbc2e365
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/searchdha.cpp
@@ -1205,6 +1205,8 @@ static bool ConfigureMirrorSet ( CSphVector<AgentDesc_t*> &tMirrors, AgentOption
MultiAgentDesc_c * ConfigureMultiAgent ( const char * szAgent, const char * szIndexName, AgentOptions_t tOptions )
{
CSphVector<AgentDesc_t *> tMirrors;
auto dFree = AtScopeExit ( [&tMirrors] { tMirrors.Apply( [] ( AgentDesc_t * pMirror ) { SafeDelete ( pMirror ); } ); } );
WarnInfo_t dWI { szIndexName, szAgent };
if ( !ConfigureMirrorSet ( tMirrors, &tOptions, dWI ) )

0 comments on commit 90008cc

Please sign in to comment.