ipmr,ip6mr: call ip6mr_free_table() on failure path
authorWANG Cong <xiyou.wangcong@gmail.com>
Wed, 25 Mar 2015 21:45:03 +0000 (14:45 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 29 Mar 2015 19:13:54 +0000 (12:13 -0700)
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ipmr.c
net/ipv6/ip6mr.c

index 9d78427652d23e33a46ab7ce2d4b6dbac1660781..92825443fad6ea0f063fedfaa176761717fb739e 100644 (file)
@@ -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;
index 34b682617f504359cecff4447c6015f90623e949..52028f449a892d9457314799e6767eef5a401824 100644 (file)
@@ -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;