diff options
author | Richard Jones <rjones@trick.home.annexia.org> | 2009-06-22 12:24:14 +0100 |
---|---|---|
committer | Richard Jones <rjones@trick.home.annexia.org> | 2009-06-22 12:24:14 +0100 |
commit | 697f50aea8638fc9f5d1a250de6c1b9f4697500e (patch) | |
tree | 5cc8e7f45e763181ff04ad080287805a93dd8d3c /daemon/file.c | |
parent | baa5a4099425803f01fa7eb2dce40c80c9c7611e (diff) | |
download | libguestfs-697f50aea8638fc9f5d1a250de6c1b9f4697500e.tar.gz libguestfs-697f50aea8638fc9f5d1a250de6c1b9f4697500e.tar.xz libguestfs-697f50aea8638fc9f5d1a250de6c1b9f4697500e.zip |
Check return value from close() call.
Diffstat (limited to 'daemon/file.c')
-rw-r--r-- | daemon/file.c | 6 |
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; } |