Displaying 1 result from an estimated 1 matches for "e0f8794".
Did you mean:
0.8794
2012 Jan 19
2
[PATCH 1/3] daemon: pwrite/pread: Don't double close on error path.
From: "Richard W.M. Jones" <rjones at redhat.com>
In Linux, close (fd) closes the file descriptor even if it returns an
error.
---
daemon/file.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/daemon/file.c b/daemon/file.c
index e0f8794..91746e0 100644
--- a/daemon/file.c
+++ b/daemon/file.c
@@ -483,7 +483,6 @@ pread_fd (int fd, int count, int64_t offset, size_t *size_r,
if (close (fd) == -1) {
reply_with_perror ("close: %s", display_path);
- close (fd);
free (buf);
return NULL;
}
@@ -539,7 +538...