[Libvirt-cim] [PATCH 3 of 3] Parse parameters passed in to CreateResourceInPool
Kaitlin Rupert
kaitlin at linux.vnet.ibm.com
Mon Aug 10 18:56:04 UTC 2009
>> @@ -673,13 +699,21 @@
>> {
>> uint32_t rc = CIM_SVPC_RETURN_FAILED;
>> CMPIStatus s = {CMPI_RC_OK, NULL};
>> + CMPIInstance *settings;
>> + CMPIObjectPath *pool;
>>
>> CU_DEBUG("CreateResourceInPool");
>>
>> + s = create_resource_parse_args(argsin,&settings,&pool);
>> + if (s.rc != CMPI_RC_OK)
>> + goto out;
>> +
>> if (s.rc == CMPI_RC_OK)
>> rc = CIM_SVPC_RETURN_COMPLETED;
>> CMReturnData(results,&rc, CMPI_uint32);
>>
>> + out:
>> +
>> return s;
>> }
>
> According to the patchset header, this should check the parameters
> passed, but this code always call create_resource_parse_args with a both
> settings and pool parameters NULL. This will always generate an error!
Settings and Pool are NULL because the create_resource_parse_args()
assigns those parameters. Once create_resource_parse_args() returns,
those params shouldn't be NULL unless create_resource_parse_args()
encounters an error.
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin at linux.vnet.ibm.com
More information about the Libvirt-cim
mailing list