diff options
| author | Masahiro Yamada <masahiroy@kernel.org> | 2025-06-24 18:04:55 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-08-28 17:28:29 +0300 |
| commit | 44337363300fa0cbc3c0db96e40d60440022b1e6 (patch) | |
| tree | a92178ee8a3e9188f66926e40f1844fc5f3307a2 /scripts | |
| parent | e55c6f052032436e4907f2f754012b3526804993 (diff) | |
| download | linux-44337363300fa0cbc3c0db96e40d60440022b1e6.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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c index a9f78e167e2e..2b99d18e703d 100644 --- a/scripts/kconfig/gconf.c +++ b/scripts/kconfig/gconf.c @@ -780,7 +780,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; @@ -792,6 +792,7 @@ static void renderer_edited(GtkCellRendererText * cell, update_tree(&rootmenu, NULL); +free: gtk_tree_path_free(path); } |
