[PATCH] Fix memory leak when the ext3's journal file is corrupted

Linux Kernel Mailing List <[email protected]> Fri, 26 May 2006 19:59:01 GMT
Newsgroups gmane.linux.kernel.commits.2-4
Message-ID <[email protected]>
commit 2c7a224a52bcd4917c9de109eced3a036af6fa87
tree 4edd65d4b4bebee512d2ace9bb64cecb789cb379
parent 818593c85a382705afd1bcb5570d89a19238fc18
author Theodore Ts'o <[email protected]> Mon, 22 May 2006 03:08:34 -0400
committer Marcelo Tosatti <[email protected]> Fri, 26 May 2006 22:33:22 -0300

[PATCH] Fix memory leak when the ext3's journal file is corrupted

Fix memory leak when the ext3's journal file is corrupted

Signed-off-by: "Theodore Ts'o" <[email protected]>

 fs/jbd/recovery.c |    1 +
 1 files changed, 1 insertion(+)

diff --git a/fs/jbd/recovery.c b/fs/jbd/recovery.c
index 35ec8c2..c02a0ef 100644
--- a/fs/jbd/recovery.c
+++ b/fs/jbd/recovery.c
@@ -534,6 +534,7 @@ static int do_one_pass(journal_t *journa
 		default:
 			jbd_debug(3, "Unrecognised magic %d, end of scan.\n",
 				  blocktype);
+			brelse(bh);
 			goto done;
 		}
 	}