From be96d21e7b5212154603dea5de166002335f9716 Mon Sep 17 00:00:00 2001 From: Roger Light Date: Mon, 10 May 2021 21:23:29 +0100 Subject: [PATCH] Fix potential double free. --- client/client_shared.c | 1 + 1 file changed, 1 insertion(+) diff --git a/client/client_shared.c b/client/client_shared.c index 8fddbbb9..23ac67e9 100644 --- a/client/client_shared.c +++ b/client/client_shared.c @@ -379,6 +379,7 @@ int client_config_load(struct mosq_config *cfg, int pub_or_sub, int argc, char * }else if(loc){ fptr = fopen(loc, "rt"); free(loc); + loc = NULL; }else{ return 1; }