From: Jeff Lucovsky Date: Fri, 10 Jul 2020 12:22:43 +0000 (-0400) Subject: output/ftp: Correct Coverity DEADCODE issue X-Git-Tag: suricata-6.0.0-beta1~225 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd22e0d7a40c8d29fd74d48f82811bf5a854a8c4;p=thirdparty%2Fsuricata.git output/ftp: Correct Coverity DEADCODE issue This commit corrects the deadcode (CID 1465224) issue in EveFTPLogCommand. --- diff --git a/src/output-json-ftp.c b/src/output-json-ftp.c index 3b17995736..a30e1ff387 100644 --- a/src/output-json-ftp.c +++ b/src/output-json-ftp.c @@ -67,7 +67,7 @@ static void EveFTPLogCommand(Flow *f, FTPTransaction *tx, JsonBuilder *jb) js_resplist = jb_new_array(); if (unlikely(js_resplist == NULL)) { - goto fail; + return; } } jb_set_string(jb, "command", tx->command_descriptor->command_name); @@ -143,13 +143,6 @@ static void EveFTPLogCommand(Flow *f, FTPTransaction *tx, JsonBuilder *jb) } else { JB_SET_STRING(jb, "reply_received", "no"); } - - return; - -fail: - if (js_resplist) { - jb_free(js_resplist); - } }