]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
eve: fix double free of sensor-name on error
authorJason Ish <jason.ish@oisf.net>
Thu, 10 Aug 2023 17:31:44 +0000 (11:31 -0600)
committerVictor Julien <victor@inliniac.net>
Thu, 10 Aug 2023 19:40:14 +0000 (21:40 +0200)
Remove the free of "sensor_name" on error in output-json as this is
cleaned up by the LogFileCtx.

Bug: #6256

src/output-json.c

index 62232a4157c5a021ba6bd13501749c8f46a7eb19..d19bc3da1545f2a98e9dd0bd8ad341c8fe88ae5a 100644 (file)
@@ -1206,9 +1206,6 @@ error_exit:
         if (json_ctx->file_ctx->prefix) {
             SCFree(json_ctx->file_ctx->prefix);
         }
-        if (json_ctx->file_ctx->sensor_name) {
-            SCFree(json_ctx->file_ctx->sensor_name);
-        }
         LogFileFreeCtx(json_ctx->file_ctx);
     }
     SCFree(json_ctx);