From: Michal Miroslaw Date: Wed, 7 Mar 2007 21:34:36 +0000 (+0100) Subject: nfnetlink_log: fix possible NULL pointer dereference X-Git-Tag: v2.6.20.3~13 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=edc34643c2d2046163482f792dd1085dccf70780;p=karo-tx-linux.git nfnetlink_log: fix possible NULL pointer dereference [NETFILTER]: nfnetlink_log: fix possible NULL pointer dereference Eliminate possible NULL pointer dereference in nfulnl_recv_config(). Signed-off-by: Michal Miroslaw Signed-off-by: Patrick McHardy Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index 0b870d6df100..5c2980d07b7f 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c @@ -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; }