From cf79c35e727a21c858ca7a346a8fc56b64c28109 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 5 Feb 2021 21:33:35 +0100 Subject: [PATCH] detect/analyzer: fix json output for warnings/notes (cherry picked from commit 57f7612ffd6de650943607f2fb168015e45a39e1) --- src/detect-engine-analyzer.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.47.2