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-Url: https://git.stricted.de/?a=commitdiff_plain;h=3bdfe7ec08b4256121a8894cd978e74fcf7031d7;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 408691b777c2..d6d3e68086f8 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;