net: fib: fib6_add: fix potential NULL pointer dereference
[deliverable/linux.git] / net / ipv6 / ip6_fib.c
index 73db48eba1c48faa046c584912f09cda8f6ae2fa..5bec666aba61d464fab4e77684eedd4265143cf9 100644 (file)
@@ -825,9 +825,9 @@ int fib6_add(struct fib6_node *root, struct rt6_info *rt, struct nl_info *info)
        fn = fib6_add_1(root, &rt->rt6i_dst.addr, rt->rt6i_dst.plen,
                        offsetof(struct rt6_info, rt6i_dst), allow_create,
                        replace_required);
-
        if (IS_ERR(fn)) {
                err = PTR_ERR(fn);
+               fn = NULL;
                goto out;
        }
 
This page took 0.031371 seconds and 5 git commands to generate.