diff options
author | Eric Sandeen <sandeen@redhat.com> | 2013-02-25 16:54:43 -0600 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2013-02-27 14:39:45 +0100 |
commit | b5acfa282b52b583d0648abc35eef8329014dd84 (patch) | |
tree | 4bafb32ffe192b2028a99269ddb1dc81dfa048dc | |
parent | 2e23e290cab6182e60e65f5eea1c07b66c077ec9 (diff) |
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>
-rw-r--r-- | btrfs-show-super.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/btrfs-show-super.c b/btrfs-show-super.c index 3614c527..f587f106 100644 --- a/btrfs-show-super.c +++ b/btrfs-show-super.c @@ -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); } |