Kaitlin Rupert wrote:
static CMPIStatus return_vsms(const CMPIObjectPath *ref,
const CMPIResult *results,
- bool name_only)
+ bool name_only,
+ bool is_get_inst)
{
CMPIInstance *inst;
The same reason here ... please init inst=NULL to avoid seg faulting the
return instance functions.
CMPIStatus s;
- s = get_migration_service(ref, &inst, _BROKER);
- if (s.rc == CMPI_RC_OK) {
- if (name_only)
- cu_return_instance_name(results, inst);
- else
- CMReturnInstance(results, inst);
- }
-
+ s = get_migration_service(ref, &inst, _BROKER, is_get_inst);
+ if ((s.rc != CMPI_RC_OK) || (inst == NULL))
+ goto out;
+
+ if (name_only)
+ cu_return_instance_name(results, inst);
+ else
+ CMReturnInstance(results, inst);
+ out:
return s;
}
--
Regards
Heidi Eckhart
Software Engineer
IBM Linux Technology Center - Open Hypervisor