linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] e2fsck: free bh on csum verify error in do_one_pass
@ 2014-07-17 21:11 Eric Sandeen
  2014-07-18  9:04 ` Lukáš Czerner
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Sandeen @ 2014-07-17 21:11 UTC (permalink / raw)
  To: ext4 development

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 <sandeen@redhat.com>
---

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;
 			}
 


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

end of thread, other threads:[~2014-07-22 20:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-17 21:11 [PATCH] e2fsck: free bh on csum verify error in do_one_pass Eric Sandeen
2014-07-18  9:04 ` Lukáš Czerner
2014-07-22 16:31   ` 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).