summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2025-06-24 18:04:55 +0300
committerMasahiro Yamada <masahiroy@kernel.org>2025-06-30 07:20:56 +0300
commitf72ed4c6a375e52a3f4b75615e4a89d29d8acea7 (patch)
tree87ee0062ec0b7a9378509b8b066be9a9a7b9a18c /scripts
parent2f2d60f489f0b2410f33103fa42296f7466673e0 (diff)
downloadlinux-f72ed4c6a375e52a3f4b75615e4a89d29d8acea7.tar.xz
kconfig: gconf: fix potential memory leak in renderer_edited()
If gtk_tree_model_get_iter() fails, gtk_tree_path_free() is not called. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Randy Dunlap <rdunlap@infradead.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/gconf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index a3978d3420d1..769f38307f34 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -745,7 +745,7 @@ static void renderer_edited(GtkCellRendererText * cell,
struct symbol *sym;
if (!gtk_tree_model_get_iter(model2, &iter, path))
- return;
+ goto free;
gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1);
sym = menu->sym;
@@ -757,6 +757,7 @@ static void renderer_edited(GtkCellRendererText * cell,
update_tree(&rootmenu, NULL);
+free:
gtk_tree_path_free(path);
}