git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix file descriptor leak in daemon.
[libguestfs.git]
/
daemon
/
proto.c
diff --git
a/daemon/proto.c
b/daemon/proto.c
index
cd61f18
..
becf27c
100644
(file)
--- a/
daemon/proto.c
+++ b/
daemon/proto.c
@@
-51,6
+51,14
@@
main_loop (int _sock)
sock = _sock;
for (;;) {
sock = _sock;
for (;;) {
+#if 0
+ /* Most common errors are leaked memory and leaked file descriptors,
+ * so run this between each command:
+ */
+ if (verbose)
+ system ("ls -l /proc/self/fd");
+#endif
+
/* Read the length word. */
xread (sock, lenbuf, 4);
xdrmem_create (&xdr, lenbuf, 4, XDR_DECODE);
/* Read the length word. */
xread (sock, lenbuf, 4);
xdrmem_create (&xdr, lenbuf, 4, XDR_DECODE);