ext4: fix typo which causes a memory leak on error path
[cascardo/linux.git] / fs / ext4 / mballoc.c
index 7f6fc41..5f3e3a3 100644 (file)
@@ -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;
        }