[PATCH 64/90] netfilter: Remove unnecessary NULL check in lsm_context
Casey Schaufler
casey at schaufler-ca.com
Fri Apr 19 00:45:51 UTC 2019
There is a redundant NULL check when releasing a security context.
Remove it.
Signed-off-by: Casey Schaufler <casey at schaufler-ca.com>
---
net/netfilter/nfnetlink_queue.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c
index 7a095b9d0a10..83bb44d70582 100644
--- a/net/netfilter/nfnetlink_queue.c
+++ b/net/netfilter/nfnetlink_queue.c
@@ -638,8 +638,7 @@ nfqnl_build_packet_message(struct net *net, struct nfqnl_instance *queue,
kfree_skb(skb);
net_err_ratelimited("nf_queue: error creating packet message\n");
nlmsg_failure:
- if (lc.context)
- security_release_secctx(&lc);
+ security_release_secctx(&lc);
return NULL;
}
--
2.19.1
More information about the Linux-security-module-archive
mailing list