Commit 4ed30ae4 authored by Michał Mirosław's avatar Michał Mirosław Committed by Adrian Bunk

[NETFILTER]: nfnetlink_log: fix possible NULL pointer dereference

Eliminate possible NULL pointer dereference in nfulnl_recv_config().
Signed-off-by: default avatarMichał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
parent 27e24517
...@@ -827,6 +827,9 @@ nfulnl_recv_config(struct sock *ctnl, struct sk_buff *skb, ...@@ -827,6 +827,9 @@ nfulnl_recv_config(struct sock *ctnl, struct sk_buff *skb,
ret = -EINVAL; ret = -EINVAL;
break; break;
} }
if (!inst)
goto out;
} else { } else {
if (!inst) { if (!inst) {
UDEBUG("no config command, and no instance for " UDEBUG("no config command, and no instance for "
...@@ -874,6 +877,7 @@ nfulnl_recv_config(struct sock *ctnl, struct sk_buff *skb, ...@@ -874,6 +877,7 @@ nfulnl_recv_config(struct sock *ctnl, struct sk_buff *skb,
out_put: out_put:
instance_put(inst); instance_put(inst);
out:
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment