summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach Brown <zab@redhat.com>2013-01-22 13:42:16 -0800
committerZach Brown <zab@redhat.com>2013-02-05 16:09:39 -0800
commit201238df269cfa8fa002b3be0ad327b48228e45c (patch)
tree274f9089c1374ddc4cbe3422e090efb581e749de
parent31802d9e7522159b99bea31ba3023777aec0d4bf (diff)
btrfs-progs: don't close(<0) in subvol create
Don't try to close an fd immediately after discovering that opening it failed. Signed-off-by: Zach Brown <zab@redhat.com>
-rw-r--r--cmds-subvolume.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/cmds-subvolume.c b/cmds-subvolume.c
index 63c5990f..2fce7aff 100644
--- a/cmds-subvolume.c
+++ b/cmds-subvolume.c
@@ -244,7 +244,6 @@ again:
fd = open_file_or_dir(dname);
if (fd < 0) {
- close(fd);
fprintf(stderr, "ERROR: can't access to '%s'\n", dname);
ret = 12;
goto out;