Skip to content

Commit a67ff06

Browse files
author
Ralph Castain
committed
Silence coverity warnings
1 parent 9980916 commit a67ff06

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

orte/tools/orte-ps/orte-ps.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* Copyright (c) 2007 Los Alamos National Security, LLC. All rights
1515
* reserved.
1616
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
17-
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
17+
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
1818
* Copyright (c) 2015 Research Organization for Information Science
1919
* and Technology (RIST). All rights reserved.
2020
* $COPYRIGHT$
@@ -651,7 +651,11 @@ static int pretty_print_vpids(orte_job_t *job) {
651651
char *snap_ref = NULL;
652652
char *snap_loc = NULL;
653653
#endif
654-
char **nodename;
654+
char **nodename = NULL;
655+
656+
if (0 == job->num_procs) {
657+
return ORTE_SUCCESS;
658+
}
655659

656660
/*
657661
* Caculate segment lengths
@@ -808,7 +812,9 @@ static int pretty_print_vpids(orte_job_t *job) {
808812
printf("\n");
809813

810814
}
811-
815+
if (NULL != nodename) {
816+
free(nodename);
817+
}
812818
return ORTE_SUCCESS;
813819
}
814820

0 commit comments

Comments
 (0)