From 3bdfe7ec08b4256121a8894cd978e74fcf7031d7 Mon Sep 17 00:00:00 2001 From: YOSHIFUJI Hideaki Date: Wed, 27 Feb 2008 12:06:38 -0800 Subject: [PATCH] [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 --- net/ipv6/sysctl_net_ipv6.c | 3 --- 1 file changed, 3 deletions(-) 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; -- 2.39.5