Btrfs-progs: fix closing of opendir()
authorWang Shilong <wangsl.fnst@cn.fujitsu.com>
Mon, 15 Jul 2013 11:36:50 +0000 (19:36 +0800)
committerDavid Sterba <dsterba@suse.cz>
Fri, 9 Aug 2013 12:32:36 +0000 (14:32 +0200)
commitc125b7cf43aac815782ded0a0f36060e81c79726
tree6d954a3f9e39f834bc96643bf5c574bdc9cea00e
parentc118c21b3e855c37c01db4be5746055629b70a19
Btrfs-progs: fix closing of opendir()

valgrind complains open_file_or_dir() causes a memory leak.That is because
if we open a directoy by opendir(), and then we should call closedir()
to free memory.

Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
12 files changed:
btrfs-fragments.c
cmds-balance.c
cmds-device.c
cmds-filesystem.c
cmds-inspect.c
cmds-qgroup.c
cmds-quota.c
cmds-replace.c
cmds-scrub.c
cmds-subvolume.c
utils.c
utils.h