btrfs-progs: don't close(<0) in subvol create
authorZach Brown <zab@redhat.com>
Tue, 22 Jan 2013 21:42:16 +0000 (13:42 -0800)
committerZach Brown <zab@redhat.com>
Wed, 6 Feb 2013 00:09:39 +0000 (16:09 -0800)
Don't try to close an fd immediately after discovering that opening it
failed.

Signed-off-by: Zach Brown <zab@redhat.com>
cmds-subvolume.c

index 63c5990..2fce7af 100644 (file)
@@ -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;