From 4ed30ae44614fce21c5917fda7c513990915f363 Mon Sep 17 00:00:00 2001 From: Michał Mirosław Date: Sat, 24 Mar 2007 21:33:56 +0100 Subject: [NETFILTER]: nfnetlink_log: fix possible NULL pointer dereference MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- net/netfilter/nfnetlink_log.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'net') diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index 6b72621d1fd..616cb7412b6 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; } -- cgit v1.2.3-18-g5258