1
1

Protect against NULL cpuset when not bound

This commit was SVN r31600.
Этот коммит содержится в:
Ralph Castain 2014-05-02 10:45:11 +00:00
родитель 0209cddb5b
Коммит c1383ca1f3

Просмотреть файл

@ -294,18 +294,20 @@ int orte_ess_base_proc_binding(void)
/* store our cpuset for exchange with non-peers
* so that other procs in a comm_spawn can know it
*/
OBJ_CONSTRUCT(&kv, opal_value_t);
kv.key = strdup(OPAL_DSTORE_CPUSET);
kv.type = OPAL_STRING;
kv.data.string = strdup(orte_process_info.cpuset);
if (OPAL_SUCCESS != (ret = opal_dstore.store(opal_dstore_nonpeer,
(opal_identifier_t*)ORTE_PROC_MY_NAME,
&kv))) {
ORTE_ERROR_LOG(ret);
if (NULL != orte_process_info.cpuset) {
OBJ_CONSTRUCT(&kv, opal_value_t);
kv.key = strdup(OPAL_DSTORE_CPUSET);
kv.type = OPAL_STRING;
kv.data.string = strdup(orte_process_info.cpuset);
if (OPAL_SUCCESS != (ret = opal_dstore.store(opal_dstore_nonpeer,
(opal_identifier_t*)ORTE_PROC_MY_NAME,
&kv))) {
ORTE_ERROR_LOG(ret);
OBJ_DESTRUCT(&kv);
goto error;
}
OBJ_DESTRUCT(&kv);
goto error;
}
OBJ_DESTRUCT(&kv);
return ORTE_SUCCESS;
error: