From: Eric Leblond Date: Tue, 20 Nov 2012 09:15:13 +0000 (+0100) Subject: unix runmode: fix JSON mem handling X-Git-Tag: suricata-1.4rc1~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f38b8fe4eb582c07bf3c1a29f3e1ce804f82931a;p=thirdparty%2Fsuricata.git unix runmode: fix JSON mem handling json_decref was not correctly used through the code. This patch fixes it. --- diff --git a/src/runmode-unix-socket.c b/src/runmode-unix-socket.c index 79888ecc88..763cafe2be 100644 --- a/src/runmode-unix-socket.c +++ b/src/runmode-unix-socket.c @@ -91,6 +91,7 @@ static TmEcode UnixSocketPcapFilesList(json_t *cmd, json_t* answer, void *data) } jarray = json_array(); if (jarray == NULL) { + json_decref(jdata); json_object_set_new(answer, "message", json_string("internal error at json object creation")); return TM_ECODE_FAILED;