lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <49A51D3D.6080003@cn.fujitsu.com>
Date:	Wed, 25 Feb 2009 18:28:13 +0800
From:	Wei Yongjun <yjwei@...fujitsu.com>
To:	Eric Paris <eparis@...hat.com>, Al Viro <viro@...iv.linux.org.uk>
CC:	LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] audit: remove some pointless conditionals before kfree_skb()

Remove some pointless conditionals before kfree_skb().

Signed-off-by: Wei Yongjun <yjwei@...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




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ