From b2e962da033c0fae3f98889f1121d0f50e91d371 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Tue, 25 Jun 2013 14:13:04 +0200 Subject: [PATCH] Coverity 1038123: memory leak on 'flowint' keyword parsing failure --- src/detect-flowint.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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; }