From b5acfa282b52b583d0648abc35eef8329014dd84 Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Mon, 25 Feb 2013 16:54:43 -0600 Subject: 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 --- btrfs-show-super.c | 1 - 1 file changed, 1 deletion(-) (limited to 'btrfs-show-super.c') diff --git a/btrfs-show-super.c b/btrfs-show-super.c index 3614c52..f587f10 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); } -- cgit v1.2.1