Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90408
b: refs/heads/master
c: a233352
h: refs/heads/master
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Mar 26, 2008
1 parent 773458e commit 0971a0b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 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: 9b674e82b73a61844967b32e1b4ecaf8eb9d1805
refs/heads/master: a233352506be35aafd49c0ba8c88ca96ebde1c3d
22 changes: 20 additions & 2 deletions trunk/net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -2390,10 +2390,18 @@ static int ipv6_route_show(struct seq_file *m, void *v)

static int ipv6_route_open(struct inode *inode, struct file *file)
{
int err;
struct net *net = get_proc_net(inode);
if (!net)
return -ENXIO;
return single_open(file, ipv6_route_show, net);

err = single_open(file, ipv6_route_show, net);
if (err < 0) {
put_net(net);
return err;
}

return 0;
}

static int ipv6_route_release(struct inode *inode, struct file *file)
Expand Down Expand Up @@ -2429,8 +2437,18 @@ static int rt6_stats_seq_show(struct seq_file *seq, void *v)

static int rt6_stats_seq_open(struct inode *inode, struct file *file)
{
int err;
struct net *net = get_proc_net(inode);
return single_open(file, rt6_stats_seq_show, net);
if (!net)
return -ENXIO;

err = single_open(file, rt6_stats_seq_show, net);
if (err < 0) {
put_net(net);
return err;
}

return 0;
}

static int rt6_stats_seq_release(struct inode *inode, struct file *file)
Expand Down

0 comments on commit 0971a0b

Please sign in to comment.