libext2fs: fix memory leak in error path in ext2fs_block_iterate2()

Reported-by: Nic Case <number9652@yahoo.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
bitmap-optimize
Theodore Ts'o 2009-07-18 10:02:41 -04:00
parent bbbb81c1d9
commit 9922c53a4d
1 changed files with 4 additions and 2 deletions

View File

@ -488,8 +488,10 @@ errcode_t ext2fs_block_iterate2(ext2_filsys fs,
abort_exit:
if (ret & BLOCK_CHANGED) {
retval = ext2fs_write_inode(fs, ino, &inode);
if (retval)
return retval;
if (retval) {
ret |= BLOCK_ERROR;
ctx.errcode = retval;
}
}
errout:
if (!block_buf)