summaryrefslogtreecommitdiffstats
path: root/daemon
diff options
context:
space:
mode:
authorRichard Jones <rjones@trick.home.annexia.org>2009-06-22 12:24:14 +0100
committerRichard Jones <rjones@trick.home.annexia.org>2009-06-22 12:24:14 +0100
commit697f50aea8638fc9f5d1a250de6c1b9f4697500e (patch)
tree5cc8e7f45e763181ff04ad080287805a93dd8d3c /daemon
parentbaa5a4099425803f01fa7eb2dce40c80c9c7611e (diff)
downloadlibguestfs-697f50aea8638fc9f5d1a250de6c1b9f4697500e.tar.gz
libguestfs-697f50aea8638fc9f5d1a250de6c1b9f4697500e.tar.xz
libguestfs-697f50aea8638fc9f5d1a250de6c1b9f4697500e.zip
Check return value from close() call.
Diffstat (limited to 'daemon')
-rw-r--r--daemon/file.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/daemon/file.c b/daemon/file.c
index 0eef0c09..3f07ffc1 100644
--- a/daemon/file.c
+++ b/daemon/file.c
@@ -58,7 +58,11 @@ do_touch (char *path)
return -1;
}
- close (fd);
+ if (close (fd) == -1) {
+ reply_with_perror ("close: %s", path);
+ return -1;
+ }
+
return 0;
}