[Libvirt-cim] [PATCH] Pass a CMPIStatus parameter in connect_by_classname() in create_system()

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Thu Aug 20 05:49:12 UTC 2009


# HG changeset patch
# User Kaitlin Rupert <karupert at us.ibm.com>
# Date 1250747237 25200
# Node ID 7efea1d379a1b4de6c4d7583b456a0a00f80ad3b
# Parent  6fc5000bc5c33ffed10f71bf87a136da3fe2e036
Pass a CMPIStatus parameter in connect_by_classname() in create_system().

connect_by_classname() excepts a valid CMPIStatus argument since it calls
CMSetStatus(), otherwise, this can lead to a seg fault.

Signed-off-by: Kaitlin Rupert <karupert at us.ibm.com>

diff -r 6fc5000bc5c3 -r 7efea1d379a1 src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c	Wed Aug 19 18:56:56 2009 -0700
+++ b/src/Virt_VirtualSystemManagementService.c	Wed Aug 19 22:47:17 2009 -0700
@@ -1403,7 +1403,7 @@
         }
 
         if (domain->uuid != NULL) {
-                conn = connect_by_classname(_BROKER, CLASSNAME(ref), NULL);
+                conn = connect_by_classname(_BROKER, CLASSNAME(ref), s);
                 if (conn == NULL) {
                         cu_statusf(_BROKER, s,
                                    CMPI_RC_ERR_FAILED,




More information about the Libvirt-cim mailing list