From: Wei Yongjun <yjwei@cn.fujitsu.com>
To: Eric Paris <eparis@redhat.com>, Al Viro <viro@zeniv.linux.org.uk>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] audit: remove some pointless conditionals before kfree_skb()
Date: Wed, 25 Feb 2009 18:28:13 +0800 [thread overview]
Message-ID: <49A51D3D.6080003@cn.fujitsu.com> (raw)
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
reply other threads:[~2009-02-25 10:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49A51D3D.6080003@cn.fujitsu.com \
--to=yjwei@cn.fujitsu.com \
--cc=eparis@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome