aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2011-07-30 12:58:41 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-02-28 06:32:25 -0800
commit131fb7cce88c8c953429ecee478477db81727273 (patch)
tree8fcf7fb9a2ee422667d1599587820b5c905b1ece
parentf1d8678b90aeaf7a3c5c30cea8a838f54cd5a8bc (diff)
downloadkernel_samsung_smdk4412-131fb7cce88c8c953429ecee478477db81727273.tar.gz
kernel_samsung_smdk4412-131fb7cce88c8c953429ecee478477db81727273.tar.bz2
kernel_samsung_smdk4412-131fb7cce88c8c953429ecee478477db81727273.zip
ext4: add missing kfree() on error return path in add_new_gdb()
commit c49bafa3842751b8955a962859f42d307673d75d upstream. We added some more error handling in b40971426a "ext4: add error checking to calls to ext4_handle_dirty_metadata()". But we need to call kfree() as well to avoid a memory leak. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--fs/ext4/resize.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 80bbc9c60c2..244100f08fc 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -499,6 +499,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode,
return err;
exit_inode:
+ kfree(n_group_desc);
/* ext4_handle_release_buffer(handle, iloc.bh); */
brelse(iloc.bh);
exit_dindj: