Skip to content

Commit

Permalink
ext4: fix typo which causes a memory leak on error path
Browse files Browse the repository at this point in the history
This was found by smatch (http://repo.or.cz/w/smatch.git/)

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@kernel.org
  • Loading branch information
Dan Carpenter authored and Theodore Ts'o committed Mar 27, 2009
1 parent 86db97c commit a7b1944
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ext4/mballoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2699,7 +2699,7 @@ int ext4_mb_init(struct super_block *sb, int needs_recovery)
i = (sb->s_blocksize_bits + 2) * sizeof(unsigned int);
sbi->s_mb_maxs = kmalloc(i, GFP_KERNEL);
if (sbi->s_mb_maxs == NULL) {
kfree(sbi->s_mb_maxs);
kfree(sbi->s_mb_offsets);
return -ENOMEM;
}

Expand Down

0 comments on commit a7b1944

Please sign in to comment.