Message ID | 20190228221933.2551-71-casey@schaufler-ca.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-security-module-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 979261575 for <patchwork-linux-security-module@patchwork.kernel.org>; Thu, 28 Feb 2019 22:20:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8AED22F2A4 for <patchwork-linux-security-module@patchwork.kernel.org>; Thu, 28 Feb 2019 22:20:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 895B32F606; Thu, 28 Feb 2019 22:20:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B5C62F587 for <patchwork-linux-security-module@patchwork.kernel.org>; Thu, 28 Feb 2019 22:20:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731880AbfB1WUc (ORCPT <rfc822;patchwork-linux-security-module@patchwork.kernel.org>); Thu, 28 Feb 2019 17:20:32 -0500 Received: from sonic309-27.consmr.mail.gq1.yahoo.com ([98.137.65.153]:35784 "EHLO sonic309-27.consmr.mail.gq1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731837AbfB1WUb (ORCPT <rfc822;linux-security-module@vger.kernel.org>); Thu, 28 Feb 2019 17:20:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=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AtCM.xGsfeLS9k_RtR6tdVUSE3RWuxZxT4gjxg6KSrv6p y7px2UfdW7jGcI0ZWNE6n3nYnfXYQG9yAyUrtDVF8mzEpmw4MrcoenSHZ0KwYOJEmdy0Wcaosi44 u8DG0WDaLPV79jz_UV68GyM5ClH_UUtjDXxMEj7PNE668M8DuFs_gdC0z8wPjd0XoAVaeOzSR3ul quI1tNhFWfVY8nQm4NVzURq57C5Jj7PHPc6pmhBi902rfAEUvepNIKhCmcPOggDVS8NbPl33Zn5f yJlfB5bxY26xPpejRTmH8MaNyja9u3WVRtRooeEc8CBJ2OeGsWVPu17rwSRovpGzQsM5RP71LPaP 5N4eFeFRY7QvgpFfJ46jF.kVzV316cgmCiwfSpRjfbOfX5m6WidNNuItBDhY8NNejARY3HjSQFKT tLbp.ateQ7wLFgY94tLgTW9sg8rH8CNjZPfKzkROaRK2jJg7HyHlpI03.diVyv_UO2CovGJdzkVX ug0W1z9l9QvJf73HCO.8JRw91sgPZkjcWnkKGWOIjb93.13dKUiKsHMATLFg- Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.gq1.yahoo.com with HTTP; Thu, 28 Feb 2019 22:20:30 +0000 Received: from c-67-169-65-224.hsd1.ca.comcast.net (EHLO localhost.localdomain) ([67.169.65.224]) by smtp404.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 4ed72522ccf44343c47df9c8f8a3f798; Thu, 28 Feb 2019 22:20:28 +0000 (UTC) From: Casey Schaufler <casey@schaufler-ca.com> To: jmorris@namei.org, linux-security-module@vger.kernel.org, selinux@vger.kernel.org Cc: keescook@chromium.org, john.johansen@canonical.com, penguin-kernel@i-love.sakura.ne.jp, paul@paul-moore.com Subject: [PATCH 70/97] netfilter: Remove unnecessary NULL check in lsm_context Date: Thu, 28 Feb 2019 14:19:06 -0800 Message-Id: <20190228221933.2551-71-casey@schaufler-ca.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190228221933.2551-1-casey@schaufler-ca.com> References: <20190228221933.2551-1-casey@schaufler-ca.com> Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: <linux-security-module.vger.kernel.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
LSM: Complete module stacking
|
expand
|
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; }
There is a redundant NULL check when releasing a security context. Remove it. Signed-off-by: Casey Schaufler <casey@schaufler-ca.com> --- net/netfilter/nfnetlink_queue.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)