
# HG changeset patch # User Kaitlin Rupert <karupert@us.ibm.com> # Date 1203733266 28800 # Node ID b950586612cfddcc119e0c0d2a53faaf06a1d8c9 # Parent 743b306e9bc680cab97c2afb60dfe9547e1d182c EC seg faults due to wrong CMPIBroker used in get_vsm_cap(). Also, make sure function returns in case of error, and shorten error meesage since it spans a line. Signed-off-by: Kaitlin Rupert <karupert@us.ibm.com> diff -r 743b306e9bc6 -r b950586612cf src/Virt_VirtualSystemManagementCapabilities.c --- a/src/Virt_VirtualSystemManagementCapabilities.c Fri Feb 22 09:51:07 2008 -0800 +++ b/src/Virt_VirtualSystemManagementCapabilities.c Fri Feb 22 18:21:06 2008 -0800 @@ -95,14 +95,16 @@ CMPIStatus get_vsm_cap(const CMPIBroker goto out; } - inst = get_typed_instance(_BROKER, + inst = get_typed_instance(broker, pfx_from_conn(conn), "VirtualSystemManagementCapabilities", NAMESPACE(ref)); - if (inst == NULL) - cu_statusf(_BROKER, &s, + if (inst == NULL) { + cu_statusf(broker, &s, CMPI_RC_ERR_FAILED, - "Can't create VirtualSystemManagementCapabilities instance"); + "Can't create instance for %s", CLASSNAME(ref)); + goto out; + } s = set_inst_properties(broker, inst);