Skip to content

Commit ac7abc6

Browse files
committed
Protect against NULL returned pointer
Thanks to @krempel-pt for the report Signed-off-by: Ralph Castain <rhc@pmix.org>
1 parent 195e36f commit ac7abc6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/mca/gds/hash/process_arrays.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,10 @@ pmix_status_t pmix_gds_hash_process_session_array(pmix_value_t *val, pmix_job_t
490490
}
491491

492492
sptr = pmix_gds_hash_check_session(trk, sid);
493+
if (NULL == sptr) {
494+
PMIX_ERROR_LOG(PMIX_ERR_BAD_PARAM);
495+
return PMIX_ERR_BAD_PARAM;
496+
}
493497
PMIX_CONSTRUCT(&ncache, pmix_list_t);
494498

495499
for (j = 1; j < size; j++) {

0 commit comments

Comments
 (0)