* [PATCH] audit: remove some pointless conditionals before kfree_skb()
@ 2009-02-25 10:28 Wei Yongjun
0 siblings, 0 replies; only message in thread
From: Wei Yongjun @ 2009-02-25 10:28 UTC (permalink / raw)
To: Eric Paris, Al Viro; +Cc: LKML
Remove some pointless conditionals before kfree_skb().
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
kernel/audit.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/kernel/audit.c b/kernel/audit.c
index ce6d8ea..35ed3ff 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -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)
--
1.5.3.8
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-02-25 10:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-25 10:28 [PATCH] audit: remove some pointless conditionals before kfree_skb() Wei Yongjun
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.