diff options
author | Eric Sandeen <sandeen@redhat.com> | 2013-03-04 16:39:51 -0600 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2013-03-10 15:48:43 +0100 |
commit | 0b9e200099c83e92e49557aef8348301f225052f (patch) | |
tree | cf3fcaf883b573ffe89b4273e59aade63f7c495f | |
parent | 90565b853538d98f63fba1a7ee5289b4fda9dac1 (diff) |
btrfs-progs: close fd on cmd_subvol_list return
stops an fd leak that Coverity found.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
-rw-r--r-- | cmds-subvolume.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cmds-subvolume.c b/cmds-subvolume.c index 461eed90..a13a58d9 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) |