From: Eric Leblond Date: Mon, 12 Jun 2017 12:04:38 +0000 (+0200) Subject: output-json-alert: don't decref used object X-Git-Tag: suricata-4.0.0-rc1~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5be44eb50019a908d4621c8dce1c138dd3437289;p=thirdparty%2Fsuricata.git 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. --- 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; }