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
str = args[1];
while (str[0]) {
- struct eb32_node *cur_step;
enum log_orig_id cur_id = LOG_ORIG_UNSPEC;
cur_sep = strcspn(str, ",");
}
}
- 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: