
# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1196272229 28800 # Node ID 89505650ebf53eadacd7dbac45c5a0c5cd664907 # Parent d144424ac5e89ea217f1a6dda6842c4b9643fb74 Fixes to ECTP for libcmpiutil API change Signed-off-by: Dan Smith <danms@us.ibm.com> diff -r d144424ac5e8 -r 89505650ebf5 src/Virt_ElementConformsToProfile.c --- a/src/Virt_ElementConformsToProfile.c Wed Nov 28 09:50:29 2007 -0800 +++ b/src/Virt_ElementConformsToProfile.c Wed Nov 28 09:50:29 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; }