From: Victor Julien Date: Tue, 23 Oct 2018 12:29:59 +0000 (+0200) Subject: bits: avoid memory leak in case of adding types X-Git-Tag: suricata-4.1.0~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ef2febc7cc995a4bf62cf18c5067d8739e1b18a;p=thirdparty%2Fsuricata.git bits: avoid memory leak in case of adding types --- diff --git a/src/detect-flowbits.c b/src/detect-flowbits.c index fa8cf62a2e..b6bbe4e6bc 100644 --- a/src/detect-flowbits.c +++ b/src/detect-flowbits.c @@ -277,6 +277,9 @@ int DetectFlowbitSetup (DetectEngineCtx *de_ctx, Signature *s, const char *rawst /* modifiers, only run when entire sig has matched */ SigMatchAppendSMToList(s, sm, DETECT_SM_LIST_POSTMATCH); break; + + default: + goto error; } return 0; diff --git a/src/detect-hostbits.c b/src/detect-hostbits.c index ead6998e20..ae9396053d 100644 --- a/src/detect-hostbits.c +++ b/src/detect-hostbits.c @@ -418,6 +418,9 @@ int DetectHostbitSetup (DetectEngineCtx *de_ctx, Signature *s, const char *rawst /* modifiers, only run when entire sig has matched */ SigMatchAppendSMToList(s, sm, DETECT_SM_LIST_POSTMATCH); break; + + default: + goto error; } return 0;