linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Add missing brelse to xattr code.
@ 2013-11-06 15:45 Dave Jones
  2013-11-12  1:08 ` Theodore Ts'o
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Jones @ 2013-11-06 15:45 UTC (permalink / raw)
  To: linux-ext4

This code was recently patched to not leak memory on the retry path,
but it seems we are also forgetting to brelse the bufferhead.
   
Signed-off-by: Dave Jones <davej@fedoraproject.org>

diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index 03e9bebba198..1423c4816a47 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -1352,6 +1352,7 @@ retry:
 					new_extra_isize = s_min_extra_isize;
 					kfree(is); is = NULL;
 					kfree(bs); bs = NULL;
+					brelse(bh);
 					goto retry;
 				}
 				error = -1;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-12 12:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-06 15:45 [PATCH] Add missing brelse to xattr code Dave Jones
2013-11-12  1:08 ` Theodore 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).