From: Michał Mirosław Date: Sat, 24 Mar 2007 20:33:56 +0000 (+0100) Subject: [NETFILTER]: nfnetlink_log: fix possible NULL pointer dereference X-Git-Tag: v2.6.16.45-rc1~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ed30ae44614fce21c5917fda7c513990915f363;p=thirdparty%2Fkernel%2Fstable.git [NETFILTER]: nfnetlink_log: fix possible NULL pointer dereference Eliminate possible NULL pointer dereference in nfulnl_recv_config(). Signed-off-by: Michał Mirosław Signed-off-by: Patrick McHardy Signed-off-by: Adrian Bunk --- diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index 6b72621d1fdd3..616cb7412b6fd 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c @@ -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; }