[PATCH 02/20] AFFS: Free sbi memory in error path

From: Jan Blunck
Date: Wed Nov 18 2009 - 04:32:11 EST


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

Signed-off-by: Jan Blunck <jblunck@xxxxxxx>
---
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/