btrfs-progs: don't call close on error fd

In the error case where fd < 0, close(fd) is the wrong
thing to do.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
master
Eric Sandeen 2013-02-25 16:54:43 -06:00 committed by David Sterba
parent 2e23e290ca
commit b5acfa282b
1 changed files with 0 additions and 1 deletions

View File

@ -97,7 +97,6 @@ int main(int argc, char **argv)
fd = open(filename, O_RDONLY, 0666);
if (fd < 0) {
fprintf(stderr, "Could not open %s\n", filename);
close(fd);
exit(1);
}