stops an fd leak that Coverity found.

Signed-off-by: Eric Sandeen <sand...@redhat.com>
---
 cmds-subvolume.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/cmds-subvolume.c b/cmds-subvolume.c
index 461eed9..a13a58d 100644
--- a/cmds-subvolume.c
+++ b/cmds-subvolume.c
@@ -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)
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to