511f6cd625
- Avoid crash if storage volume deletion fails - Fix multiple FD leaks - Fix bug in dispatch FD events when a callback is marked deleted - Fix parsing of storage volume owner/group/mode - Fix memory allocation for virDomainGetVcpus RPC handler - Avoid deadlock in setting vCPU count - Use correct driver name in Xen block detach
41 lines
1.1 KiB
Diff
41 lines
1.1 KiB
Diff
Index: src/remote_internal.c
|
|
===================================================================
|
|
RCS file: /data/cvs/libxen/src/remote_internal.c,v
|
|
retrieving revision 1.141
|
|
diff -u -u -p -r1.141 remote_internal.c
|
|
--- src/remote_internal.c 3 Mar 2009 19:33:34 -0000 1.141
|
|
+++ src/remote_internal.c 16 Mar 2009 16:57:17 -0000
|
|
@@ -332,7 +332,7 @@ doRemoteOpen (virConnectPtr conn,
|
|
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
|
|
int flags)
|
|
{
|
|
- int wakeupFD[2];
|
|
+ int wakeupFD[2] = { -1, -1 };
|
|
char *transport_str = NULL;
|
|
|
|
if (conn->uri) {
|
|
@@ -885,6 +885,11 @@ doRemoteOpen (virConnectPtr conn,
|
|
#endif
|
|
}
|
|
|
|
+ if (wakeupFD[0] >= 0) {
|
|
+ close(wakeupFD[0]);
|
|
+ close(wakeupFD[1]);
|
|
+ }
|
|
+
|
|
VIR_FREE(priv->hostname);
|
|
goto cleanup;
|
|
}
|
|
@@ -1350,6 +1355,11 @@ doRemoteClose (virConnectPtr conn, struc
|
|
} while (reap != -1 && reap != priv->pid);
|
|
}
|
|
#endif
|
|
+ if (priv->wakeupReadFD >= 0) {
|
|
+ close(priv->wakeupReadFD);
|
|
+ close(priv->wakeupSendFD);
|
|
+ }
|
|
+
|
|
|
|
/* Free hostname copy */
|
|
free (priv->hostname);
|