# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1196195105 28800
# Node ID 0bbb737215af97d0704bbbd6e2526f6aec839228
# Parent fd942395e4dc888d1eede22d2dae5b99d9eed4eb
Fixes to ECTP for libcmpiutil API change
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r fd942395e4dc -r 0bbb737215af src/Virt_ElementConformsToProfile.c
--- a/src/Virt_ElementConformsToProfile.c Tue Nov 27 12:24:55 2007 -0800
+++ b/src/Virt_ElementConformsToProfile.c Tue Nov 27 12:25:05 2007 -0800
@@ -101,11 +101,10 @@ static CMPIStatus prof_to_elem(const CMP
struct inst_list *list)
{
CMPIStatus s = {CMPI_RC_OK, NULL};
- char *id;
+ const char *id;
int i;
- id = cu_get_str_path(ref, "InstanceID");
- if (id == NULL) {
+ if (cu_get_str_path(ref, "InstanceID", &id) != CMPI_RC_OK) {
CMSetStatusWithChars(_BROKER, &s,
CMPI_RC_ERR_FAILED,
"No InstanceID specified");
@@ -116,13 +115,11 @@ static CMPIStatus prof_to_elem(const CMP
if (STREQ(id, profiles[i]->reg_id)) {
s = elem_instances(ref, info, list, profiles[i]);
if ((s.rc != CMPI_RC_OK))
- goto error;
+ goto out;
break;
}
}
-
- error:
- free(id);
+
out:
return s;
}