* [PATCH] audit: Remove redundant null check
@ 2020-08-26 4:00 Xu Wang
2020-08-26 13:29 ` Paul Moore
0 siblings, 1 reply; 2+ messages in thread
From: Xu Wang @ 2020-08-26 4:00 UTC (permalink / raw)
To: paul, eparis; +Cc: linux-audit, linux-kernel
Because kfree_skb already checked NULL skb parameter,
so the additional check is unnecessary, just remove it.
Signed-off-by: Xu Wang <vulab@iscas.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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] audit: Remove redundant null check
2020-08-26 4:00 [PATCH] audit: Remove redundant null check Xu Wang
@ 2020-08-26 13:29 ` Paul Moore
0 siblings, 0 replies; 2+ messages in thread
From: Paul Moore @ 2020-08-26 13:29 UTC (permalink / raw)
To: Xu Wang; +Cc: Eric Paris, linux-audit, linux-kernel
On Wed, Aug 26, 2020 at 12:00 AM Xu Wang <vulab@iscas.ac.cn> wrote:
>
> Because kfree_skb already checked NULL skb parameter,
> so the additional check is unnecessary, just remove it.
>
> Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
> ---
> kernel/audit.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Merged into audit/next, thanks.
--
paul moore
www.paul-moore.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-26 13:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-26 4:00 [PATCH] audit: Remove redundant null check Xu Wang
2020-08-26 13:29 ` Paul Moore
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).