[Libvirt-cim] [PATCH 08 of 17] Fixes to DevicePool for libcmpiutil API change

Dan Smith danms at us.ibm.com
Wed Nov 28 17:10:21 UTC 2007


# HG changeset patch
# User Dan Smith <danms at us.ibm.com>
# Date 1196272229 28800
# Node ID fde363d69d8db4a85a2fdc52cad40ccc5ccc4236
# Parent  cac519783620f111b033536c6e57978bc3eb7798
Fixes to DevicePool for libcmpiutil API change

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

diff -r cac519783620 -r fde363d69d8d src/Virt_DevicePool.c
--- a/src/Virt_DevicePool.c	Wed Nov 28 09:50:29 2007 -0800
+++ b/src/Virt_DevicePool.c	Wed Nov 28 09:50:29 2007 -0800
@@ -730,10 +730,9 @@ static CMPIStatus GetInstance(CMPIInstan
         CMPIStatus s;
         CMPIInstance *inst;
         virConnectPtr conn = NULL;
-        char *id = NULL;
-
-        id = cu_get_str_path(reference, "InstanceID");
-        if (id == NULL) {
+        const char *id = NULL;
+
+        if (cu_get_str_path(reference, "InstanceID", &id) != CMPI_RC_OK) {
                 cu_statusf(_BROKER, &s,
                            CMPI_RC_ERR_FAILED,
                            "Missing InstanceID");
@@ -756,7 +755,6 @@ static CMPIStatus GetInstance(CMPIInstan
 
 
  out:
-        free(id);
         virConnectClose(conn);
 
         return s;




More information about the Libvirt-cim mailing list