From: Victor Julien Date: Fri, 5 Feb 2021 20:33:35 +0000 (+0100) Subject: detect/analyzer: fix json output for warnings/notes X-Git-Tag: suricata-6.0.4~100 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf79c35e727a21c858ca7a346a8fc56b64c28109;p=thirdparty%2Fsuricata.git detect/analyzer: fix json output for warnings/notes (cherry picked from commit 57f7612ffd6de650943607f2fb168015e45a39e1) --- diff --git a/src/detect-engine-analyzer.c b/src/detect-engine-analyzer.c index c44dc5cdfd..090f5a6f1a 100644 --- a/src/detect-engine-analyzer.c +++ b/src/detect-engine-analyzer.c @@ -865,11 +865,13 @@ void EngineAnalysisRules2(const DetectEngineCtx *de_ctx, const Signature *s) jb_close(ctx.js); if (ctx.js_warnings) { + jb_close(ctx.js_warnings); jb_set_object(ctx.js, "warnings", ctx.js_warnings); jb_free(ctx.js_warnings); ctx.js_warnings = NULL; } if (ctx.js_notes) { + jb_close(ctx.js_notes); jb_set_object(ctx.js, "notes", ctx.js_notes); jb_free(ctx.js_notes); ctx.js_notes = NULL;