git.annexia.org
/
libguestfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
baa5a40
)
Check return value from close() call.
author
Richard Jones
<rjones@trick.home.annexia.org>
Mon, 22 Jun 2009 11:24:14 +0000
(12:24 +0100)
committer
Richard Jones
<rjones@trick.home.annexia.org>
Mon, 22 Jun 2009 11:24:14 +0000
(12:24 +0100)
daemon/file.c
patch
|
blob
|
history
diff --git
a/daemon/file.c
b/daemon/file.c
index
0eef0c0
..
3f07ffc
100644
(file)
--- 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;
}