Skip to content

Commit

Permalink
audit: Remove redundant null check
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Paul Moore <paul@paul-moore.com>
  • Loading branch information
ISCAS-Vulab authored and pcmoore committed Aug 26, 2020
1 parent 265c320 commit c072035
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kernel/audit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c072035

Please sign in to comment.