mirror of
https://github.com/kdave/btrfs-progs
synced 2025-02-28 07:50:32 +00:00
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>
This commit is contained in:
parent
2e23e290ca
commit
b5acfa282b
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user