From 524ee70cfa94e9fe49c5c06223806ad35a957041 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 13 May 2024 14:37:02 +0200 Subject: [PATCH] reputation: minor cleanup No need to init ptrs to NULL after SCCalloc. (cherry picked from commit 3e46c516514cde867f34723a77958e8fd10bebb5) --- src/reputation.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/reputation.c b/src/reputation.c index cd51746490..dde42b09d3 100644 --- a/src/reputation.c +++ b/src/reputation.c @@ -587,7 +587,6 @@ int SRepInit(DetectEngineCtx *de_ctx) ConfNode *file = NULL; const char *filename = NULL; int init = 0; - int i = 0; de_ctx->srepCIDR_ctx = (SRepCIDRTree *)SCMalloc(sizeof(SRepCIDRTree)); if (de_ctx->srepCIDR_ctx == NULL) @@ -595,11 +594,6 @@ int SRepInit(DetectEngineCtx *de_ctx) memset(de_ctx->srepCIDR_ctx, 0, sizeof(SRepCIDRTree)); SRepCIDRTree *cidr_ctx = de_ctx->srepCIDR_ctx; - for (i = 0; i < SREP_MAX_CATS; i++) { - cidr_ctx->srepIPV4_tree[i] = NULL; - cidr_ctx->srepIPV6_tree[i] = NULL; - } - if (SRepGetVersion() == 0) { SC_ATOMIC_INIT(srep_eversion); init = 1; -- 2.47.2