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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 24 Dec 2012 13:58:14 +0800
From:	Chen Gang <gang.chen@...anux.com>
To:	jack@...e.cz, akpm@...ux-foundation.org
CC:	linux-ext4@...r.kernel.org
Subject: [PATCH] fs/ext3: set pointer = NULL, after kfree it


  set s->base = NULL, after kfree it.

Signed-off-by: Chen Gang <gang.chen@...anux.com>
---
 fs/ext3/xattr.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/ext3/xattr.c b/fs/ext3/xattr.c
index d22ebb7..57aab94 100644
--- a/fs/ext3/xattr.c
+++ b/fs/ext3/xattr.c
@@ -847,8 +847,10 @@ cleanup:
 	if (ce)
 		mb_cache_entry_release(ce);
 	brelse(new_bh);
-	if (!(bs->bh && s->base == bs->bh->b_data))
+	if (!(bs->bh && s->base == bs->bh->b_data)) {
 		kfree(s->base);
+		s->base = NULL;
+	}
 
 	return error;
 
-- 
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ