Skip to content

Commit 39992d1

Browse files
author
Ralph Castain
committed
Silence trivial Coverity warnings
1 parent ead9b63 commit 39992d1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

opal/mca/pmix/pmix3x/pmix/src/buffer_ops/unpack.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ pmix_status_t pmix_bfrop_unpack_status(pmix_buffer_t *buffer, void *dest,
682682
break;
683683
case PMIX_DATA_ARRAY:
684684
/* this is now a pointer, so allocate storage for it */
685-
val->data.darray = (pmix_data_array_t*)malloc(sizeof(val->data.darray));
685+
val->data.darray = (pmix_data_array_t*)malloc(sizeof(pmix_data_array_t));
686686
if (NULL == val->data.darray) {
687687
return PMIX_ERR_NOMEM;
688688
}
@@ -698,7 +698,7 @@ pmix_status_t pmix_bfrop_unpack_status(pmix_buffer_t *buffer, void *dest,
698698
/**** DEPRECATED ****/
699699
case PMIX_INFO_ARRAY:
700700
/* this field is now a pointer, so we must allocate storage for it */
701-
val->data.array = (pmix_info_array_t*)malloc(sizeof(val->data.array));
701+
val->data.array = (pmix_info_array_t*)malloc(sizeof(pmix_info_array_t));
702702
if (NULL == val->data.array) {
703703
return PMIX_ERR_NOMEM;
704704
}

opal/mca/pmix/pmix3x/pmix3x_client.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ int pmix3x_fence(opal_list_t *procs, int collect_data)
258258
}
259259
}
260260
if (NULL == job) {
261+
PMIX_PROC_FREE(parray, cnt);
261262
return OPAL_ERR_NOT_FOUND;
262263
}
263264
(void)strncpy(parray[n].nspace, job->nspace, PMIX_MAX_NSLEN);

0 commit comments

Comments
 (0)