From a859d2dc3f39e9d42b2208e9d3b4e7262f337542 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 13 Jan 2017 18:24:24 +0100 Subject: [PATCH] Prevent memory leak --- core_info.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core_info.c b/core_info.c index fa3b484b98..ec198fbbfe 100644 --- a/core_info.c +++ b/core_info.c @@ -126,6 +126,9 @@ static void core_info_list_resolve_all_firmware( free(tmp); tmp = NULL; } + if (tmp) + free(tmp); + tmp = NULL; if (config_get_bool(config, opt_key , &tmp_bool)) info->firmware[c].optional = tmp_bool; }