summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2013-02-25 16:54:43 -0600
committerDavid Sterba <dsterba@suse.cz>2013-02-27 14:39:45 +0100
commitb5acfa282b52b583d0648abc35eef8329014dd84 (patch)
tree4bafb32ffe192b2028a99269ddb1dc81dfa048dc
parent2e23e290cab6182e60e65f5eea1c07b66c077ec9 (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.c1
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);
}