linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/3] e2fsprogs/tune2fs: fix memory leak in inode_scan_and_fix()
@ 2014-11-12  9:49 Xiaoguang Wang
  2014-11-12  9:49 ` [PATCH v2 2/3] e2fsprogs/tune2fs: rewrite metadata checksums when resizing inode size Xiaoguang Wang
  2014-11-12  9:49 ` [PATCH v2 3/3] e2fsprogs/tune2fs: fix memory write overflow Xiaoguang Wang
  0 siblings, 2 replies; 19+ messages in thread
From: Xiaoguang Wang @ 2014-11-12  9:49 UTC (permalink / raw)
  To: linux-ext4; +Cc: tytso, darrick.wong, Xiaoguang Wang

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>
---
 misc/tune2fs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/misc/tune2fs.c b/misc/tune2fs.c
index 7fee870..065b483 100644
--- a/misc/tune2fs.c
+++ b/misc/tune2fs.c
@@ -2147,6 +2147,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;
 }
-- 
1.8.2.1


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

end of thread, other threads:[~2014-12-03 14:34 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-12  9:49 [PATCH v2 1/3] e2fsprogs/tune2fs: fix memory leak in inode_scan_and_fix() Xiaoguang Wang
2014-11-12  9:49 ` [PATCH v2 2/3] e2fsprogs/tune2fs: rewrite metadata checksums when resizing inode size Xiaoguang Wang
2014-11-12 22:39   ` Darrick J. Wong
2014-11-14  8:57     ` Xiaoguang Wang
2014-11-12  9:49 ` [PATCH v2 3/3] e2fsprogs/tune2fs: fix memory write overflow Xiaoguang Wang
2014-11-14  9:15   ` [PATCH v3 1/3] e2fsprogs/tune2fs: fix memory leak in inode_scan_and_fix() Xiaoguang Wang
2014-11-14  9:15     ` [PATCH v3 2/3] e2fsprogs/tune2fs: rewrite metadata checksums when resizing inode size Xiaoguang Wang
2014-11-14 23:10       ` Darrick J. Wong
2014-11-17  1:56         ` Xiaoguang Wang
2014-11-17 19:10         ` [PATCH] tune2fs: disable csum verification before resizing inode Darrick J. Wong
2014-12-03  3:33           ` Theodore Ts'o
2014-12-03  3:46           ` Theodore Ts'o
2014-12-03  5:39             ` Darrick J. Wong
2014-12-03 14:34               ` Theodore Ts'o
2014-12-03  3:30       ` [PATCH v3 2/3] e2fsprogs/tune2fs: rewrite metadata checksums when resizing inode size Theodore Ts'o
2014-11-14  9:15     ` [PATCH v3 3/3] e2fsprogs/tune2fs: fix memory write overflow Xiaoguang Wang
2014-11-14 18:58       ` Darrick J. Wong
2014-12-03  3:32       ` Theodore Ts'o
2014-12-03  2:07     ` [PATCH v3 1/3] e2fsprogs/tune2fs: fix memory leak in inode_scan_and_fix() 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).