Skip to contentSkip to conversation

audit: remove some pointless conditionals before kfree_skb()

PATCH New Wei Yongjun 1 participant 1 message Feb 25, 2009 Audit

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 audit: remove some pointless conditionals before kfree_skb()

Remove some pointless conditionals before kfree_skb().

---
 kernel/audit.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
kernel/audit.c +2 -4
index ce6d8ea..35ed3ff 100644
@@ -531,8 +531,7 @@ struct sk_buff *audit_make_reply(int pid, int seq, int type, int done,
 	return skb;
 
 nlmsg_failure:			/* Used by NLMSG_PUT */
-	if (skb)
-		kfree_skb(skb);
+	kfree_skb(skb);
 	return NULL;
 }
 
@@ -1032,8 +1031,7 @@ static void audit_buffer_free(struct audit_buffer *ab)
 	if (!ab)
 		return;
 
-	if (ab->skb)
-		kfree_skb(ab->skb);
+	kfree_skb(ab->skb);
 
 	spin_lock_irqsave(&audit_freelist_lock, flags);
 	if (audit_freelist_count > AUDIT_MAXFREE)
Signature · 1 line
1.5.3.8