Add missing brelse() calls to avoid memory leaks in error paths. (Thanks
to Michael C. Thompson for pointing these out; they were originally
found using Coverity.)
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
+2006-05-14 Theodore Tso <tytso@mit.edu>
+
+ * recovery.c (do_one_pass), journal.c (e2fsck_get_journal): Add
+ missing brelse() calls to avoid memory leaks in error
+ paths. (Thanks to Michael C. Thompson for pointing these
+ out; they were originally found using Coverity.)
+
2006-05-13 Theodore Tso <tytso@mit.edu>
* badblocks.c (read_bad_blocks_file): Pass the private option -X
goto errout;
}
ll_rw_block(READ, 1, &bh);
- if ((retval = bh->b_err) != 0)
+ if ((retval = bh->b_err) != 0) {
+ brelse(bh);
goto errout;
+ }
memcpy(&jsuper, start ? bh->b_data : bh->b_data + 1024,
sizeof(jsuper));
brelse(bh);
default:
jbd_debug(3, "Unrecognised magic %d, end of scan.\n",
blocktype);
+ brelse(bh);
goto done;
}
}