aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/fib_semantics.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index a13c84763d4c..3b83c34019fc 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -152,6 +152,7 @@ void free_fib_info(struct fib_info *fi)
152 nh->nh_dev = NULL; 152 nh->nh_dev = NULL;
153 } endfor_nexthops(fi); 153 } endfor_nexthops(fi);
154 fib_info_cnt--; 154 fib_info_cnt--;
155 release_net(fi->fib_net);
155 kfree(fi); 156 kfree(fi);
156} 157}
157 158
@@ -730,7 +731,7 @@ struct fib_info *fib_create_info(struct fib_config *cfg)
730 goto failure; 731 goto failure;
731 fib_info_cnt++; 732 fib_info_cnt++;
732 733
733 fi->fib_net = net; 734 fi->fib_net = hold_net(net);
734 fi->fib_protocol = cfg->fc_protocol; 735 fi->fib_protocol = cfg->fc_protocol;
735 fi->fib_flags = cfg->fc_flags; 736 fi->fib_flags = cfg->fc_flags;
736 fi->fib_priority = cfg->fc_priority; 737 fi->fib_priority = cfg->fc_priority;