From 5be44eb50019a908d4621c8dce1c138dd3437289 Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Mon, 12 Jun 2017 14:04:38 +0200 Subject: [PATCH] output-json-alert: don't decref used object In the unlikely case of a allocation error we will still use the existing object so it should not be decref and freed. --- src/output-json-alert.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/output-json-alert.c b/src/output-json-alert.c index 7526c96029..32f956dd7b 100644 --- a/src/output-json-alert.c +++ b/src/output-json-alert.c @@ -246,7 +246,6 @@ void AlertJsonHeader(const Packet *p, const PacketAlert *pa, json_t *js) json_t *ajs = json_object(); if (ajs == NULL) { - json_decref(js); return; }