lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <419e1ef1-4814-4a56-b92a-8d3b48017855@infradead.org>
Date: Sun, 29 Jun 2025 19:21:54 -0700
From: Randy Dunlap <rdunlap@...radead.org>
To: Masahiro Yamada <masahiroy@...nel.org>, linux-kbuild@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH 07/66] kconfig: gconf: fix potential memory leak in
 renderer_edited()



On 6/24/25 8:04 AM, Masahiro Yamada wrote:
> If gtk_tree_model_get_iter() fails, gtk_tree_path_free() is not called.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>

Acked-by: Randy Dunlap <rdunlap@...radead.org>

> ---
> 
>  scripts/kconfig/gconf.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> 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);
>  }
>  

-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ