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

# HG changeset patch # User Dan Smith <danms@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@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;

Dan Smith wrote:
# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1201894237 28800 # Node ID 5d554b65865ebaabf5261f7e8557dd7a40bf6175 # Parent 6c3c30bf8e026c9b3609195c55766c6c3f757b99 Fix Virt_Device crash due to improper virConnectClose()
I tested this out, and it worked for me. No crash after applying this patch. +1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com
participants (2)
-
Dan Smith
-
Kaitlin Rupert