HE> + if (rasd_classname_from_type(rasd->resource_type, &base) !=
CMPI_RC_OK) {
HE> + cu_statusf(broker, s,
HE> + CMPI_RC_ERR_FAILED,
HE> + "Resource type not known");
HE> + goto err;
HE> + }
HE> +
HE> inst = get_typed_instance(broker,
HE> CLASSNAME(ref),
HE> - "ResourceAllocationSettingData",
HE> + base,
HE> NAMESPACE(ref));
HE> CMSetProperty(inst, "InstanceID", inst_id, CMPI_chars);
HE> @@ -723,6 +732,7 @@ static CMPIInstance *sdc_rasd_inst(const
HE> prop_list[i].value, prop_list[i].type);
HE> }
HE> + err:
HE> CU_DEBUG("freeing prop_list");
HE> free_rasd_prop_list(prop_list);
HE> out:
I didn't notice this before, but shouldn't we initialize prop_list to
NULL, make sure free_rasd_prop_list() can handle NULL, and then put
the free call below the out: target? There is another place in the
function that looks like it jumps to out after prop_list could have
been initialized. Further, it would be better to have it below out,
so that additions like this one don't have to add or utilize an err:
target.
Heidi, I know this isn't really a part of your patch, but I think it's
worth looking at while we're here.
Jay, can you comment?
Thanks!
--
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms(a)us.ibm.com