From: Victor Julien Date: Thu, 10 Apr 2014 07:36:19 +0000 (+0200) Subject: eve-log: fix mem leak at shutdown X-Git-Tag: suricata-2.0.1rc1~59 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bc1c06b9e4ab7687bcc269e52d0940cb730b53e2;p=thirdparty%2Fsuricata.git eve-log: fix mem leak at shutdown Make sure we free all memory in the shutdown function. --- diff --git a/src/output-json.c b/src/output-json.c index b369d03262..64383e7d6a 100644 --- a/src/output-json.c +++ b/src/output-json.c @@ -469,6 +469,7 @@ OutputCtx *OutputJsonInitCtx(ConfNode *conf) json_out = json_ctx->json_out; } + SCLogInfo("returning output_ctx %p", output_ctx); return output_ctx; } @@ -477,6 +478,7 @@ static void OutputJsonDeInitCtx(OutputCtx *output_ctx) OutputJsonCtx *json_ctx = (OutputJsonCtx *)output_ctx->data; LogFileCtx *logfile_ctx = json_ctx->file_ctx; LogFileFreeCtx(logfile_ctx); + SCFree(json_ctx); SCFree(output_ctx); }