summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/ipv4/fib_frontend.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index c1caf9ded280..e5b6b0534c5f 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -156,9 +156,12 @@ int fib_unmerge(struct net *net)
{
struct fib_table *old, *new;
+ /* attempt to fetch local table if it has been allocated */
old = fib_get_table(net, RT_TABLE_LOCAL);
- new = fib_trie_unmerge(old);
+ if (!old)
+ return 0;
+ new = fib_trie_unmerge(old);
if (!new)
return -ENOMEM;