summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2025-06-24 18:04:55 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-08-28 17:26:02 +0300
commit234c09b2af68fe06be8ff41e32bdc85e6891e27a (patch)
treea79cc03680c58cecd642f368a0e7b79f7f44b79c /scripts
parent4ba63e06e4ac961dac01c2517d7a79e700604b7a (diff)
downloadlinux-234c09b2af68fe06be8ff41e32bdc85e6891e27a.tar.xz
kconfig: gconf: fix potential memory leak in renderer_edited()
[ Upstream commit f72ed4c6a375e52a3f4b75615e4a89d29d8acea7 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.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 87f8a4db5bc6..3c726ead8f7e 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -783,7 +783,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;
@@ -795,6 +795,7 @@ static void renderer_edited(GtkCellRendererText * cell,
update_tree(&rootmenu, NULL);
+free:
gtk_tree_path_free(path);
}