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>
This commit is contained in:
Zach Brown 2013-01-22 13:42:16 -08:00
parent 31802d9e75
commit 201238df26

View 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;