]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
nfnetlink_log: fix possible NULL pointer dereference
authorMichal Miroslaw <mirq-linux@rere.qmqm.pl>
Wed, 7 Mar 2007 21:34:36 +0000 (22:34 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 13 Mar 2007 18:26:45 +0000 (11:26 -0700)
[NETFILTER]: nfnetlink_log: fix possible NULL pointer dereference

Eliminate possible NULL pointer dereference in nfulnl_recv_config().

Signed-off-by: Michal Miroslaw <mirq-linux@rere.qmqm.pl>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/netfilter/nfnetlink_log.c

index 0b870d6df100d19ca6852b6b7bbc83b1e6197386..5c2980d07b7f7829aa10ca6c6e4e2963f86b6170 100644 (file)
@@ -867,6 +867,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 "
@@ -920,6 +923,7 @@ nfulnl_recv_config(struct sock *ctnl, struct sk_buff *skb,
 
 out_put:
        instance_put(inst);
+out:
        return ret;
 }