* [patch] ext4: add a kfree() on error i add_new_gdb()
@ 2011-07-30 8:25 Dan Carpenter
2011-07-30 16:59 ` Ted Ts'o
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2011-07-30 8:25 UTC (permalink / raw)
To: Theodore Ts'o
Cc: Andreas Dilger, open list:EXT4 FILE SYSTEM, kernel-janitors
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>
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 6e3327d..71085df 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,
return err;
exit_inode:
+ kfree(n_group_desc);
/* ext4_handle_release_buffer(handle, iloc.bh); */
brelse(iloc.bh);
exit_dindj:
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-30 16:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-30 8:25 [patch] ext4: add a kfree() on error i add_new_gdb() Dan Carpenter
2011-07-30 16:59 ` Ted Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).