From: YOSHIFUJI Hideaki Date: Wed, 27 Feb 2008 20:06:38 +0000 (-0800) Subject: [IPV6] SYSCTL: Fix possible memory leakage in error path. X-Git-Tag: v2.6.25-rc4~148^2~32 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3bdfe7ec08b4256121a8894cd978e74fcf7031d7;p=linux-2.6 [IPV6] SYSCTL: Fix possible memory leakage in error path. In error path, we do need to free memory just allocated. Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller --- diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c index 408691b777..d6d3e68086 100644 --- a/net/ipv6/sysctl_net_ipv6.c +++ b/net/ipv6/sysctl_net_ipv6.c @@ -101,9 +101,6 @@ static int ipv6_sysctl_net_init(struct net *net) net->ipv6.sysctl.table = register_net_sysctl_table(net, net_ipv6_ctl_path, ipv6_table); - if (!net->ipv6.sysctl.table) - return -ENOMEM; - if (!net->ipv6.sysctl.table) goto out_ipv6_icmp_table;