[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1364228725-16218-1-git-send-email-honkiko@gmail.com>
Date: Tue, 26 Mar 2013 00:25:25 +0800
From: Hong Zhiguo <honkiko@...il.com>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, stephen@...workplumber.org,
Hong Zhiguo <honkiko@...il.com>
Subject: [PATCH net-next] ipv6: don't free static mem in the case of init_net
Signed-off-by: Hong Zhiguo <honkiko@...il.com>
---
net/ipv6/addrconf.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index fa36a67..1f5f51f 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -4891,10 +4891,14 @@ static int __net_init addrconf_init_net(struct net *net)
err_reg_dflt:
__addrconf_sysctl_unregister(all);
err_reg_all:
- kfree(dflt);
+ if (dflt != &ipv6_devconf_dflt) {
+ kfree(dflt);
+ }
#endif
err_alloc_dflt:
- kfree(all);
+ if (all != &ipv6_devconf) {
+ kfree(all);
+ }
err_alloc_all:
return err;
}
--
1.7.10.4
--
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