orted/pmix: protect against NULL node in orte_pmix_server_register_nspace()
Этот коммит содержится в:
родитель
9f3e1a0620
Коммит
e67c3d0a14
@ -16,7 +16,7 @@
|
|||||||
* Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
|
* Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
|
||||||
* Copyright (c) 2014 Mellanox Technologies, Inc.
|
* Copyright (c) 2014 Mellanox Technologies, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2014 Research Organization for Information Science
|
* Copyright (c) 2014-2016 Research Organization for Information Science
|
||||||
* and Technology (RIST). All rights reserved.
|
* and Technology (RIST). All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
@ -382,12 +382,14 @@ int orte_pmix_server_register_nspace(orte_job_t *jdata)
|
|||||||
opal_list_append(pmap, &kv->super);
|
opal_list_append(pmap, &kv->super);
|
||||||
|
|
||||||
/* node ID */
|
/* node ID */
|
||||||
|
if (NULL != node) {
|
||||||
kv = OBJ_NEW(opal_value_t);
|
kv = OBJ_NEW(opal_value_t);
|
||||||
kv->key = strdup(OPAL_PMIX_NODEID);
|
kv->key = strdup(OPAL_PMIX_NODEID);
|
||||||
kv->type = OPAL_UINT32;
|
kv->type = OPAL_UINT32;
|
||||||
kv->data.uint32 = node->index;
|
kv->data.uint32 = node->index;
|
||||||
opal_list_append(pmap, &kv->super);
|
opal_list_append(pmap, &kv->super);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* mark the job as registered */
|
/* mark the job as registered */
|
||||||
orte_set_attribute(&jdata->attributes, ORTE_JOB_NSPACE_REGISTERED, ORTE_ATTR_LOCAL, NULL, OPAL_BOOL);
|
orte_set_attribute(&jdata->attributes, ORTE_JOB_NSPACE_REGISTERED, ORTE_ATTR_LOCAL, NULL, OPAL_BOOL);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user