From: Philippe Antoine Date: Thu, 28 Sep 2023 19:17:00 +0000 (+0200) Subject: detect: remove code writing unused values X-Git-Tag: suricata-7.0.2~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad5f41c95c327a7b39df4d74e3a9a4cc9646f096;p=thirdparty%2Fsuricata.git detect: remove code writing unused values Coveridy ID 1546822 1546823 and 1546824 --- diff --git a/src/detect-engine-address.c b/src/detect-engine-address.c index 2875171947..ac10e142de 100644 --- a/src/detect-engine-address.c +++ b/src/detect-engine-address.c @@ -1289,7 +1289,6 @@ int DetectAddressTestConfVars(void) } DetectAddressHeadFree(gh); - gh = NULL; DetectAddressHeadFree(ghn); ghn = NULL; } diff --git a/src/detect-engine-build.c b/src/detect-engine-build.c index e957b50bdb..8b76212719 100644 --- a/src/detect-engine-build.c +++ b/src/detect-engine-build.c @@ -1645,8 +1645,6 @@ int CreateGroupedPortList(DetectEngineCtx *de_ctx, DetectPort *port_list, Detect /* when a group's sigs are added to the joingr, we can free it */ gr->next = NULL; DetectPortFree(de_ctx, gr); - gr = NULL; - /* append */ } else { gr->next = NULL; diff --git a/src/util-threshold-config.c b/src/util-threshold-config.c index 74e58fbc8c..5d762a8f70 100644 --- a/src/util-threshold-config.c +++ b/src/util-threshold-config.c @@ -510,7 +510,6 @@ static int SetupThresholdRule(DetectEngineCtx *de_ctx, uint32_t id, uint32_t gid if (sm != NULL) { SigMatchRemoveSMFromList(s, sm, DETECT_SM_LIST_THRESHOLD); SigMatchFree(de_ctx, sm); - sm = NULL; } }