Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78242
b: refs/heads/master
c: 9fa8964
h: refs/heads/master
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Jan 28, 2008
1 parent 17bfdda commit 090d90e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c3bac5a71b24f6ed892b250d4f7511cedc33d34c
refs/heads/master: 9fa896429905eccc263ff0d5e592ecaf651af12d
17 changes: 9 additions & 8 deletions trunk/net/ipv4/devinet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1506,12 +1506,13 @@ static void devinet_sysctl_register(struct in_device *in_dev,
{
int i;
struct net_device *dev = in_dev ? in_dev->dev : NULL;
struct devinet_sysctl_table *t = kmemdup(&devinet_sysctl, sizeof(*t),
GFP_KERNEL);
struct devinet_sysctl_table *t;
char *dev_name = NULL;

t = kmemdup(&devinet_sysctl, sizeof(*t), GFP_KERNEL);
if (!t)
return;
goto out;

for (i = 0; i < ARRAY_SIZE(t->devinet_vars) - 1; i++) {
t->devinet_vars[i].data += (char *)p - (char *)&ipv4_devconf;
t->devinet_vars[i].extra1 = p;
Expand All @@ -1532,7 +1533,7 @@ static void devinet_sysctl_register(struct in_device *in_dev,
*/
dev_name = kstrdup(dev_name, GFP_KERNEL);
if (!dev_name)
goto free;
goto free;

t->devinet_dev[0].procname = dev_name;
t->devinet_dev[0].child = t->devinet_vars;
Expand All @@ -1542,16 +1543,16 @@ static void devinet_sysctl_register(struct in_device *in_dev,

t->sysctl_header = register_sysctl_table(t->devinet_root_dir);
if (!t->sysctl_header)
goto free_procname;
goto free_procname;

p->sysctl = t;
return;

/* error path */
free_procname:
free_procname:
kfree(dev_name);
free:
free:
kfree(t);
out:
return;
}

Expand Down

0 comments on commit 090d90e

Please sign in to comment.