From 31b3be7aaeaa0893795246a91da2f7bdc3857a65 Mon Sep 17 00:00:00 2001 From: Aurelien DARRAGON Date: Tue, 16 Sep 2025 08:17:03 +0200 Subject: [PATCH] CLEANUP: log: remove deadcode in px_parse_log_steps() When logsteps proxy storage was migrated from eb nodes to bitmasks in 6a92b14 ("MEDIUM: log/proxy: store log-steps selection using a bitmask, not an eb tree"), some unused eb node related code was left over in px_parse_log_steps() Not only this code is unused, it also resulted in wasted memory since an eb node was allocated for nothing. This should fix GH #3121 --- src/log.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/log.c b/src/log.c index fc6aeb9d1..a1cc0bc3e 100644 --- a/src/log.c +++ b/src/log.c @@ -6848,7 +6848,6 @@ static int px_parse_log_steps(char **args, int section_type, struct proxy *curpx str = args[1]; while (str[0]) { - struct eb32_node *cur_step; enum log_orig_id cur_id = LOG_ORIG_UNSPEC; cur_sep = strcspn(str, ","); @@ -6886,13 +6885,6 @@ static int px_parse_log_steps(char **args, int section_type, struct proxy *curpx } } - cur_step = malloc(sizeof(*cur_step)); - if (!cur_step) { - memprintf(err, "memory failure when trying to configure log-step (%.*s)", - (int)cur_sep, str); - goto end; - } - cur_step->key = cur_id; BUG_ON(cur_id > 64); // for now we don't support more than 64 log origins curpx->conf.log_steps.steps_1 |= (1ULL << cur_id); next: