diff options
| author | Masahiro Yamada <masahiroy@kernel.org> | 2025-06-25 00:04:55 +0900 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-08-28 16:24:25 +0200 |
| commit | f7d9f0717be82e2119ec55c45597a95303197173 (patch) | |
| tree | 459e15232c34187a295e93007a65bb7b44e51fcb /scripts/kconfig | |
| parent | 28498cf306f939989a5bff58797952450c7f3219 (diff) | |
| download | linux-f7d9f0717be82e2119ec55c45597a95303197173.tar.gz linux-f7d9f0717be82e2119ec55c45597a95303197173.tar.bz2 linux-f7d9f0717be82e2119ec55c45597a95303197173.zip | |
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/kconfig')
| -rw-r--r-- | scripts/kconfig/gconf.c | 3 |
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); } |
