summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMichal Miroslaw <mirq-linux@rere.qmqm.pl>2007-03-05 00:59:20 +0100
committerDavid S. Miller <davem@sunset.davemloft.net>2007-03-05 22:25:24 +0100
commitdd16704eba171b32ef0cded3a4f562b33b911066 (patch)
treeb596880077eb678110373c62b2c6c398ff2d0533 /net
parent[NETFILTER]: nfnetlink_log: fix NULL pointer dereference (diff)
downloadlinux-dd16704eba171b32ef0cded3a4f562b33b911066.tar.xz
linux-dd16704eba171b32ef0cded3a4f562b33b911066.zip
[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: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nfnetlink_log.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
index 1b940512d87b..b669db564695 100644
--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -858,6 +858,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 "
@@ -911,6 +914,7 @@ nfulnl_recv_config(struct sock *ctnl, struct sk_buff *skb,
out_put:
instance_put(inst);
+out:
return ret;
}