Thread (3 messages) 3 messages, 3 authors, 2014-07-22
STALE4385d

[PATCH] e2fsck: free bh on csum verify error in do_one_pass

From: Eric Sandeen <hidden>
Date: 2014-07-17 21:12:00
Subsystem: the rest · Maintainer: Linus Torvalds

Coverity (re-)spotted this; it was triaged as a false positive,
but it seems pretty clear that the bh (which was just checked)
isn't currently freed before the function exits.

Signed-off-by: Eric Sandeen <redacted>
---
diff --git a/e2fsck/recovery.c b/e2fsck/recovery.c
index 54579c2..66d02b2 100644
--- a/e2fsck/recovery.c
+++ b/e2fsck/recovery.c
@@ -523,6 +523,7 @@ static int do_one_pass(journal_t *journal,
 			    !jbd2_descr_block_csum_verify(journal,
 							  bh->b_data)) {
 				err = -EIO;
+				brelse(bh);
 				goto failed;
 			}
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help