diff options
author | Richard Jones <rjones@redhat.com> | 2009-04-20 11:35:57 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-04-20 11:35:57 +0100 |
commit | 2069ade88144d8efd272a74be24b5c9ff49844dc (patch) | |
tree | 0057e2583218c7edc88f64c52870c94fc165fddb /daemon/proto.c | |
parent | 24ccbb29ac475187f51a27dcd318db2b4824a0c1 (diff) | |
download | libguestfs-2069ade88144d8efd272a74be24b5c9ff49844dc.tar.gz libguestfs-2069ade88144d8efd272a74be24b5c9ff49844dc.tar.xz libguestfs-2069ade88144d8efd272a74be24b5c9ff49844dc.zip |
Fix file descriptor leak in daemon.
Diffstat (limited to 'daemon/proto.c')
-rw-r--r-- | daemon/proto.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/daemon/proto.c b/daemon/proto.c index cd61f18d..becf27c3 100644 --- a/daemon/proto.c +++ b/daemon/proto.c @@ -51,6 +51,14 @@ main_loop (int _sock) 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); |