From 2ef2febc7cc995a4bf62cf18c5067d8739e1b18a Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Tue, 23 Oct 2018 14:29:59 +0200 Subject: [PATCH] bits: avoid memory leak in case of adding types --- src/detect-flowbits.c | 3 +++ src/detect-hostbits.c | 3 +++ 2 files changed, 6 insertions(+) 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; -- 2.47.2