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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 18 Nov 2009 10:24:35 +0100
From:	Jan Blunck <jblunck@...e.de>
To:	linux-fsdevel@...r.kernel.org
Cc:	Linux-Kernel Mailinglist <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>, jkacur@...hat.com,
	Thomas Gleixner <tglx@...utronix.de>,
	Christoph Hellwig <hch@...radead.org>,
	Arnd Bergmann <arnd@...db.de>, matthew@....cx,
	Jan Blunck <jblunck@...e.de>,
	Roman Zippel <zippel@...ux-m68k.org>
Subject: [PATCH 02/20] AFFS: Free sbi memory in error path

I spotted the missing kfree() while removing the BKL.

Signed-off-by: Jan Blunck <jblunck@...e.de>
---
 fs/affs/super.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/affs/super.c b/fs/affs/super.c
index 104fdcb..058c2c7 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -316,7 +316,7 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent)
 				&blocksize,&sbi->s_prefix,
 				sbi->s_volume, &mount_flags)) {
 		printk(KERN_ERR "AFFS: Error parsing options\n");
-		return -EINVAL;
+		goto out_error_free_sbi;
 	}
 	/* N.B. after this point s_prefix must be released */
 
@@ -498,6 +498,7 @@ out_error_noinode:
 	kfree(sbi->s_bitmap);
 	affs_brelse(root_bh);
 	kfree(sbi->s_prefix);
+out_error_free_sbi:
 	kfree(sbi);
 	sb->s_fs_info = NULL;
 	return ret;
-- 
1.6.4.2

--
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