projects
/
platform
/
upstream
/
btrfs-progs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
90565b8
)
btrfs-progs: close fd on cmd_subvol_list return
author
Eric Sandeen
<sandeen@redhat.com>
Mon, 4 Mar 2013 22:39:51 +0000
(16:39 -0600)
committer
David Sterba
<dsterba@suse.cz>
Sun, 10 Mar 2013 14:48:43 +0000
(15:48 +0100)
stops an fd leak that Coverity found.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
cmds-subvolume.c
patch
|
blob
|
history
diff --git
a/cmds-subvolume.c
b/cmds-subvolume.c
index
461eed9
..
a13a58d
100644
(file)
--- 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)