[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200826040022.5297-1-vulab@iscas.ac.cn>
Date: Wed, 26 Aug 2020 04:00:22 +0000
From: Xu Wang <vulab@...as.ac.cn>
To: paul@...l-moore.com, eparis@...hat.com
Cc: linux-audit@...hat.com, linux-kernel@...r.kernel.org
Subject: [PATCH] audit: Remove redundant null check
Because kfree_skb already checked NULL skb parameter,
so the additional check is unnecessary, just remove it.
Signed-off-by: Xu Wang <vulab@...as.ac.cn>
---
kernel/audit.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/audit.c b/kernel/audit.c
index 7efaece534a9..144e1e9322a5 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -934,8 +934,7 @@ static void audit_free_reply(struct audit_reply *reply)
if (!reply)
return;
- if (reply->skb)
- kfree_skb(reply->skb);
+ kfree_skb(reply->skb);
if (reply->net)
put_net(reply->net);
kfree(reply);
--
2.17.1
Powered by blists - more mailing lists