tune2fs: fix memory leak in inode_scan_and_fix()

When we use ext2fs_open_inode_scan() to iterate inodes and finish
jobs, we also need a ext2fs_close_inode_scan(scan) operation, but in
inode_scan_and_fix(), we forgot to call it, fix this error.

Signed-off-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
test-maint
Xiaoguang Wang 2014-12-02 21:06:40 -05:00 committed by Theodore Ts'o
parent e68476935b
commit 5da8912008
1 changed files with 1 additions and 0 deletions

View File

@ -1603,6 +1603,7 @@ static int inode_scan_and_fix(ext2_filsys fs, ext2fs_block_bitmap bmap)
err_out:
ext2fs_free_mem(&block_buf);
ext2fs_close_inode_scan(scan);
return retval;
}