One of the error paths in block_iterate could return before freeing the scratch memory. Here we free that memory before returning. Signed-off-by: Nic Case <number9652@xxxxxxxxx> --- diff --git a/e2fsprogs-1.41.8-orig/lib/ext2fs/block.c b/e2fsprogs-1.41.8/lib/ext2fs/block.c index de5342d..bb20f6e 100644 --- a/e2fsprogs-1.41.8-orig/lib/ext2fs/block.c +++ b/e2fsprogs-1.41.8/lib/ext2fs/block.c @@ -488,8 +488,11 @@ errcode_t ext2fs_block_iterate2(ext2_filsys fs, abort_exit: if (ret & BLOCK_CHANGED) { retval = ext2fs_write_inode(fs, ino, &inode); - if (retval) + if (retval) { + if (!block_buf) + ext2fs_free_mem(&ctx.ind_buf); return retval; + } } errout: if (!block_buf) --- -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html