[Libvirt-cim] [PATCH] Fix Virt_Device crash due to improper virConnectClose()

Dan Smith danms at us.ibm.com
Fri Feb 1 19:32:13 UTC 2008


# HG changeset patch
# User Dan Smith <danms at us.ibm.com>
# Date 1201894237 28800
# Node ID 5d554b65865ebaabf5261f7e8557dd7a40bf6175
# Parent  6c3c30bf8e026c9b3609195c55766c6c3f757b99
Fix Virt_Device crash due to improper virConnectClose()

This was identified as being necessary in the first round, but it actually
breaks things.  The conn here is not new, it's just the one from the current
dom pointer, which means that the first time we close it, all subsequent
devices break (or crash)

Signed-off-by: Dan Smith <danms at us.ibm.com>

diff -r 6c3c30bf8e02 -r 5d554b65865e src/Virt_Device.c
--- a/src/Virt_Device.c	Fri Feb 01 11:17:15 2008 +0100
+++ b/src/Virt_Device.c	Fri Feb 01 11:30:37 2008 -0800
@@ -224,7 +224,6 @@ static int device_set_systemname(CMPIIns
                 CMSetProperty(instance, "SystemCreationClassName",
                               (CMPIValue *)sccn, CMPI_chars);
                 free(sccn);
-                virConnectClose(conn);
         }
 
         return 1;




More information about the Libvirt-cim mailing list