In the error case where fd < 0, close(fd) is the wrong
thing to do.
Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---
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 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);
}
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html