From: Victor Julien Date: Tue, 25 Jun 2013 12:13:04 +0000 (+0200) Subject: Coverity 1038123: memory leak on 'flowint' keyword parsing failure X-Git-Tag: suricata-2.0beta1~96 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b2e962da033c0fae3f98889f1121d0f50e91d371;p=thirdparty%2Fsuricata.git Coverity 1038123: memory leak on 'flowint' keyword parsing failure --- diff --git a/src/detect-flowint.c b/src/detect-flowint.c index de34e93bca..0794174725 100644 --- a/src/detect-flowint.c +++ b/src/detect-flowint.c @@ -394,13 +394,17 @@ static int DetectFlowintSetup(DetectEngineCtx *de_ctx, Signature *s, char *rawst case FLOWINT_MODIFIER_NOTSET: SigMatchAppendSMToList(s, sm, DETECT_SM_LIST_MATCH); break; + default: + goto error; } return 0; error: - if (sfd) DetectFlowintFree(sfd); - if (sm) SCFree(sm); + if (sfd) + DetectFlowintFree(sfd); + if (sm) + SCFree(sm); return -1; }