Skip to content

Commit

Permalink
ipmr,ip6mr: call ip6mr_free_table() on failure path
Browse files Browse the repository at this point in the history
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
congwang authored and davem330 committed Mar 29, 2015
1 parent 7a1e890 commit f243e5a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion net/ipv4/ipmr.c
Expand Up @@ -268,7 +268,7 @@ static int __net_init ipmr_rules_init(struct net *net)
return 0;

err2:
kfree(mrt);
ipmr_free_table(mrt);
err1:
fib_rules_unregister(ops);
return err;
Expand Down
2 changes: 1 addition & 1 deletion net/ipv6/ip6mr.c
Expand Up @@ -252,7 +252,7 @@ static int __net_init ip6mr_rules_init(struct net *net)
return 0;

err2:
kfree(mrt);
ip6mr_free_table(mrt);
err1:
fib_rules_unregister(ops);
return err;
Expand Down

0 comments on commit f243e5a

Please sign in to comment.