From a2ffc7fe759cf66495204c74d365c1ba9a93c711 Mon Sep 17 00:00:00 2001 From: Richard Cohen Date: Thu, 26 Jan 2023 14:10:26 +0000 Subject: [PATCH] Fix memory leak in binreloc function _br_find_exe() Ironically, it seems to be in a code path that is only followed when using valgrind --- libgnucash/core-utils/binreloc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libgnucash/core-utils/binreloc.c b/libgnucash/core-utils/binreloc.c index 828b9acc2e..9e28cb6678 100644 --- a/libgnucash/core-utils/binreloc.c +++ b/libgnucash/core-utils/binreloc.c @@ -195,6 +195,7 @@ _br_find_exe (Gnc_GbrInitError *error) result = g_strdup (result); fclose (f); + g_free (line); return result; #endif /* ENABLE_BINRELOC */ }