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]
Date:	Tue, 17 Apr 2012 07:18:50 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	majianpeng <majianpeng@...il.com>
Cc:	netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH] net/ipv4:Remove two memleak reports by
 kmemeleak_not_leak

On Tue, 2012-04-17 at 09:41 +0800, majianpeng wrote:
> From 582ed93b990e88110287ed0388bcb9057b1b8591 Mon Sep 17 00:00:00 2001
> From: majianpeng <majianpeng@...il.com>
> Date: Tue, 17 Apr 2012 09:36:26 +0800
> Subject: [PATCH] net/ipv4:Remove two memleak reports by kmemeleak_not_leak.
> 
> 
> Signed-off-by: majianpeng <majianpeng@...il.com>
> ---
>  net/ipv4/route.c |    8 ++++++--
>  1 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/net/ipv4/route.c b/net/ipv4/route.c
> index 167ea10..1984c82 100644
> --- a/net/ipv4/route.c
> +++ b/net/ipv4/route.c
> @@ -3504,7 +3504,11 @@ int __init ip_rt_init(void)
>   * this nonsense will go away.
>   */
>  void __init ip_static_sysctl_init(void)
> -{
> -	register_sysctl_paths(ipv4_path, ipv4_skeleton);
> +{
> +	struct ctl_table_header *ctl_header;
> +
> +	ctl_header = register_sysctl_paths(ipv4_path, ipv4_skeleton);
> +	if (ctl_header)
> +		kmemleak_not_leak(ctl_header);
>  }
>  #endif

No need for this temp var and conditional.

Just :

	kmemleak_not_leak(register_sysctl_paths(ipv4_path, ipv4_skeleton));




--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ