diff options
-rw-r--r-- | net/ipv6/addrconf.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index f177424c186f..2d2886a0b66d 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -4127,7 +4127,8 @@ static void addrconf_sysctl_register(struct inet6_dev *idev, struct ipv6_devconf | |||
4127 | 4127 | ||
4128 | t = kmemdup(&addrconf_sysctl, sizeof(*t), GFP_KERNEL); | 4128 | t = kmemdup(&addrconf_sysctl, sizeof(*t), GFP_KERNEL); |
4129 | if (t == NULL) | 4129 | if (t == NULL) |
4130 | return; | 4130 | goto out; |
4131 | |||
4131 | for (i=0; t->addrconf_vars[i].data; i++) { | 4132 | for (i=0; t->addrconf_vars[i].data; i++) { |
4132 | t->addrconf_vars[i].data += (char*)p - (char*)&ipv6_devconf; | 4133 | t->addrconf_vars[i].data += (char*)p - (char*)&ipv6_devconf; |
4133 | t->addrconf_vars[i].extra1 = idev; /* embedded; no ref */ | 4134 | t->addrconf_vars[i].extra1 = idev; /* embedded; no ref */ |
@@ -4147,7 +4148,7 @@ static void addrconf_sysctl_register(struct inet6_dev *idev, struct ipv6_devconf | |||
4147 | */ | 4148 | */ |
4148 | dev_name = kstrdup(dev_name, GFP_KERNEL); | 4149 | dev_name = kstrdup(dev_name, GFP_KERNEL); |
4149 | if (!dev_name) | 4150 | if (!dev_name) |
4150 | goto free; | 4151 | goto free; |
4151 | 4152 | ||
4152 | t->addrconf_dev[0].procname = dev_name; | 4153 | t->addrconf_dev[0].procname = dev_name; |
4153 | 4154 | ||
@@ -4159,16 +4160,15 @@ static void addrconf_sysctl_register(struct inet6_dev *idev, struct ipv6_devconf | |||
4159 | t->sysctl_header = register_sysctl_table(t->addrconf_root_dir); | 4160 | t->sysctl_header = register_sysctl_table(t->addrconf_root_dir); |
4160 | if (t->sysctl_header == NULL) | 4161 | if (t->sysctl_header == NULL) |
4161 | goto free_procname; | 4162 | goto free_procname; |
4162 | else | 4163 | |
4163 | p->sysctl = t; | 4164 | p->sysctl = t; |
4164 | return; | 4165 | return; |
4165 | 4166 | ||
4166 | /* error path */ | 4167 | free_procname: |
4167 | free_procname: | ||
4168 | kfree(dev_name); | 4168 | kfree(dev_name); |
4169 | free: | 4169 | free: |
4170 | kfree(t); | 4170 | kfree(t); |
4171 | 4171 | out: | |
4172 | return; | 4172 | return; |
4173 | } | 4173 | } |
4174 | 4174 | ||