diff options
author | Dan Carpenter <error27@gmail.com> | 2011-07-30 12:58:41 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2011-07-30 12:58:41 -0400 |
commit | c49bafa3842751b8955a962859f42d307673d75d (patch) | |
tree | 6c738a314fd1e15043c0b1c3a1cc527758a38d56 | |
parent | 59be8e7280c10fd8f078ba6dc2bcdc2b1453b6ab (diff) |
ext4: add missing kfree() on error return path in add_new_gdb()
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>
-rw-r--r-- | fs/ext4/resize.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index 6e3327d6ff1f..71085df97bbd 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c | |||
@@ -517,6 +517,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode, | |||
517 | return err; | 517 | return err; |
518 | 518 | ||
519 | exit_inode: | 519 | exit_inode: |
520 | kfree(n_group_desc); | ||
520 | /* ext4_handle_release_buffer(handle, iloc.bh); */ | 521 | /* ext4_handle_release_buffer(handle, iloc.bh); */ |
521 | brelse(iloc.bh); | 522 | brelse(iloc.bh); |
522 | exit_dindj: | 523 | exit_dindj: |