]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ext4: fix typo which causes a memory leak on error path
authorDan Carpenter <error27@gmail.com>
Wed, 1 Apr 2009 18:05:04 +0000 (18:05 +0000)
committerChris Wright <chrisw@sous-sol.org>
Mon, 27 Apr 2009 17:36:51 +0000 (10:36 -0700)
upstream commit: a7b19448ddbdc34b2b8fedc048ba154ca798667b

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
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
fs/ext4/mballoc.c

index 9f61e62f435f6baba02899bf9eaecfa1e10773f1..87972a3d46c8205c0a0ead425b124f33cc923013 100644 (file)
@@ -2693,7 +2693,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;
        }