btrfs-progs: close fd on cmd_subvol_list return

stops an fd leak that Coverity found.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
This commit is contained in:
Eric Sandeen 2013-03-04 16:39:51 -06:00 committed by David Sterba
parent 90565b8535
commit 0b9e200099

View file

@ -464,6 +464,8 @@ static int cmd_subvol_list(int argc, char **argv)
!is_list_all && !is_only_in_path, NULL);
out:
if (fd != -1)
close(fd);
if (filter_set)
btrfs_list_free_filter_set(filter_set);
if (comparer_set)