orte/tools: fix NULL pointer dereference
as reported by Coverity with CIDs 1196671 and 1196824
Этот коммит содержится в:
родитель
7dabc7b3ab
Коммит
8dc4f30fae
@ -11,6 +11,8 @@
|
|||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
|
* Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
|
||||||
* Copyright (c) 2010-2011 Cisco Systems, Inc. All rights reserved.
|
* Copyright (c) 2010-2011 Cisco Systems, Inc. All rights reserved.
|
||||||
|
* Copyright (c) 2015 Research Organization for Information Science
|
||||||
|
* and Technology (RIST). All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -275,14 +277,12 @@ static void show_mca_version(const mca_base_component_t* component,
|
|||||||
asprintf(&tmp, "%s)", content);
|
asprintf(&tmp, "%s)", content);
|
||||||
free(content);
|
free(content);
|
||||||
} else {
|
} else {
|
||||||
tmp = NULL;
|
asprintf(&tmp, ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
orte_info_out(message, NULL, tmp);
|
orte_info_out(message, NULL, tmp);
|
||||||
free(message);
|
free(message);
|
||||||
if (NULL != tmp) {
|
|
||||||
free(tmp);
|
free(tmp);
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
asprintf(&message, "mca:%s:%s:version", component->mca_type_name, component->mca_component_name);
|
asprintf(&message, "mca:%s:%s:version", component->mca_type_name, component->mca_component_name);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user