]> git.itanic.dy.fi Git - linux-stable/commitdiff
[NETFILTER]: nfnetlink_log: fix possible NULL pointer dereference
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>
Sat, 24 Mar 2007 20:33:56 +0000 (21:33 +0100)
committerAdrian Bunk <bunk@stusta.de>
Sat, 24 Mar 2007 20:33:56 +0000 (21:33 +0100)
Eliminate possible NULL pointer dereference in nfulnl_recv_config().

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
net/netfilter/nfnetlink_log.c

index 6b72621d1fdd39d80496f965a7aadc2a5f5d3d0d..616cb7412b6fd8d3ec9f4731d586d2bef93fd86d 100644 (file)
@@ -827,6 +827,9 @@ nfulnl_recv_config(struct sock *ctnl, struct sk_buff *skb,
                        ret = -EINVAL;
                        break;
                }
+
+               if (!inst)
+                       goto out;
        } else {
                if (!inst) {
                        UDEBUG("no config command, and no instance for "
@@ -874,6 +877,7 @@ nfulnl_recv_config(struct sock *ctnl, struct sk_buff *skb,
 
 out_put:
        instance_put(inst);
+out:
        return ret;
 }