Skip to content

Commit 87201a8

Browse files
author
Ralph Castain
committed
Silence coverity warnings
Signed-off-by: Ralph Castain <[email protected]>
1 parent c99978a commit 87201a8

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

orte/mca/rmaps/base/rmaps_base_ranking.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,8 @@ static int rank_by(orte_job_t *jdata,
413413
return ORTE_ERROR;
414414
}
415415
/* ignore procs not on this object */
416-
if (!hwloc_bitmap_intersects(obj->cpuset, locale->cpuset)) {
416+
if (NULL == locale ||
417+
!hwloc_bitmap_intersects(obj->cpuset, locale->cpuset)) {
417418
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
418419
"mca:rmaps:rank_by: proc at position %d is not on object %d",
419420
j, i);

orte/orted/orted_comm.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,24 +663,32 @@ void orte_daemon_recv(int status, orte_process_name_t* sender,
663663
ORTE_ERROR_LOG(ret);
664664
free(cmpdata);
665665
OBJ_DESTRUCT(&data);
666+
OBJ_RELEASE(answer);
667+
goto CLEANUP;
666668
}
667669
/* pack the compressed length */
668670
if (ORTE_SUCCESS != (ret = opal_dss.pack(answer, &cmplen, 1, OPAL_SIZE))) {
669671
ORTE_ERROR_LOG(ret);
670672
free(cmpdata);
671673
OBJ_DESTRUCT(&data);
674+
OBJ_RELEASE(answer);
675+
goto CLEANUP;
672676
}
673677
/* pack the uncompressed length */
674678
if (ORTE_SUCCESS != (ret = opal_dss.pack(answer, &data.bytes_used, 1, OPAL_SIZE))) {
675679
ORTE_ERROR_LOG(ret);
676680
free(cmpdata);
677681
OBJ_DESTRUCT(&data);
682+
OBJ_RELEASE(answer);
683+
goto CLEANUP;
678684
}
679685
/* pack the compressed info */
680686
if (ORTE_SUCCESS != (ret = opal_dss.pack(answer, cmpdata, cmplen, OPAL_UINT8))) {
681687
ORTE_ERROR_LOG(ret);
682688
free(cmpdata);
683689
OBJ_DESTRUCT(&data);
690+
OBJ_RELEASE(answer);
691+
goto CLEANUP;
684692
}
685693
OBJ_DESTRUCT(&data);
686694
free(cmpdata);
@@ -691,6 +699,8 @@ void orte_daemon_recv(int status, orte_process_name_t* sender,
691699
ORTE_ERROR_LOG(ret);
692700
OBJ_DESTRUCT(&data);
693701
free(cmpdata);
702+
OBJ_RELEASE(answer);
703+
goto CLEANUP;
694704
}
695705
/* transfer the payload across */
696706
opal_dss.copy_payload(answer, &data);

orte/util/nidmap.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,9 +1285,11 @@ int orte_util_nidmap_generate_ppn(orte_job_t *jdata, char **ppn)
12851285
}
12861286
}
12871287
OPAL_LIST_DESTRUCT(&prk[n]); // releases all the actives objects
1288-
opal_argv_append_nosize(&cache, ptmp);
1289-
free(ptmp);
1290-
ptmp = NULL;
1288+
if (NULL != ptmp) {
1289+
opal_argv_append_nosize(&cache, ptmp);
1290+
free(ptmp);
1291+
ptmp = NULL;
1292+
}
12911293
}
12921294
free(prk);
12931295
free(cnt);

0 commit comments

Comments
 (0)