# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1196195089 28800
# Node ID 7e2a9350d9794c4744ecab188da956434f28ce6c
# Parent 0d30be4ad77c9a476eeee6dcd56c183c7de566a2
Fixes to DevicePool for libcmpiutil API change
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r 0d30be4ad77c -r 7e2a9350d979 src/Virt_DevicePool.c
--- a/src/Virt_DevicePool.c Tue Nov 27 12:24:41 2007 -0800
+++ b/src/Virt_DevicePool.c Tue Nov 27 12:24:49 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;