diff mbox

ext4: typo leads to small leak

Message ID Pine.LNX.4.64.0809291437490.14101@usbsys.site
State Accepted, archived
Headers show

Commit Message

Dan Carpenter March 27, 2009, 10:36 a.m. UTC
This was found by smatch (http://repo.or.cz/w/smatch.git/)

regards,
dan carpenter

Signed-off-by: Dan Carpenter <error27@gmail.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Eric Sandeen March 27, 2009, 2:13 p.m. UTC | #1
Dan Carpenter wrote:
> This was found by smatch (http://repo.or.cz/w/smatch.git/)
> 
> regards,
> dan carpenter
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

Thanks!  Maybe one for the stable trees.

> --- orig/fs/ext4/mballoc.c	2009-03-26 18:22:30.000000000 +0300
> +++ devel/fs/ext4/mballoc.c	2009-03-26 18:22:56.000000000 +0300
> @@ -2693,7 +2693,7 @@
>  	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;
>  	}
>  
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- orig/fs/ext4/mballoc.c	2009-03-26 18:22:30.000000000 +0300
+++ devel/fs/ext4/mballoc.c	2009-03-26 18:22:56.000000000 +0300
@@ -2693,7 +2693,7 @@ 
 	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;
 	}