From 63b84c493bc4d032c800af93d343b49aaaeac180 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Wed, 15 Feb 2023 15:40:39 +0000 Subject: [PATCH] Don't leak memory on bridge config. Closes oss-fuzz #56003. Non-critical, this was only in unreleased code. --- src/conf.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/conf.c b/src/conf.c index 57204a02..06069d41 100644 --- a/src/conf.c +++ b/src/conf.c @@ -1029,12 +1029,6 @@ static int config__read_file_core(struct mosquitto__config *config, bool reload, }else{ cur_bridge->addresses[i].port = 1883; } - /* This looks a bit weird, but isn't. Before this - * call, cur_bridge->addresses[i].address points - * to the tokenised part of the line, it will be - * reused in a future parse of a config line so we - * must duplicate it. */ - cur_bridge->addresses[i].address = mosquitto__strdup(cur_bridge->addresses[i].address); conf__attempt_resolve(cur_bridge->addresses[i].address, "bridge address", MOSQ_LOG_WARNING, "Warning"); } if(cur_bridge->address_count == 0){