Skip to content

Commit a04f1cd

Browse files
author
Ralph Castain
committed
Silence some Coverity warnings
1 parent dc857a9 commit a04f1cd

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

opal/mca/pmix/pmix120/pmix/src/server/pmix_server_ops.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,6 @@ pmix_status_t pmix_server_notify_error_client(pmix_peer_t *peer,
10881088
PMIX_PROC_CREATE(procs, nprocs);
10891089
cnt = nprocs;
10901090
if (PMIX_SUCCESS != (rc = pmix_bfrop.unpack(buf, procs, &cnt, PMIX_PROC))) {
1091-
PMIX_PROC_FREE(procs, nprocs);
10921091
PMIX_ERROR_LOG(rc);
10931092
goto exit;
10941093
}

opal/mca/pmix/pmix120/pmix120_client.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ int pmix120_abort(int flag, const char *msg,
129129
}
130130
}
131131
if (NULL == job) {
132+
PMIX_PROC_FREE(parray, cnt);
132133
return OPAL_ERR_NOT_FOUND;
133134
}
134135
(void)strncpy(parray[n].nspace, job->nspace, PMIX_MAX_NSLEN);
@@ -230,6 +231,7 @@ int pmix120_fence(opal_list_t *procs, int collect_data)
230231
}
231232
}
232233
if (NULL == job) {
234+
PMIX_PROC_FREE(parray, cnt);
233235
return OPAL_ERR_NOT_FOUND;
234236
}
235237
(void)strncpy(parray[n].nspace, job->nspace, PMIX_MAX_NSLEN);
@@ -292,6 +294,7 @@ int pmix120_fencenb(opal_list_t *procs, int collect_data,
292294
}
293295
}
294296
if (NULL == job) {
297+
PMIX_PROC_FREE(parray, cnt);
295298
return OPAL_ERR_NOT_FOUND;
296299
}
297300
(void)strncpy(parray[n].nspace, job->nspace, PMIX_MAX_NSLEN);
@@ -999,6 +1002,7 @@ int pmix120_connect(opal_list_t *procs)
9991002
}
10001003
}
10011004
if (NULL == job) {
1005+
PMIX_PROC_FREE(parray, cnt);
10021006
OPAL_ERROR_LOG(OPAL_ERR_NOT_FOUND);
10031007
return OPAL_ERR_NOT_FOUND;
10041008
}
@@ -1205,7 +1209,7 @@ int pmix120_resolve_peers(const char *nodename, opal_jobid_t jobid,
12051209
}
12061210
if (NULL == job) {
12071211
job = OBJ_NEW(opal_pmix120_jobid_trkr_t);
1208-
(void)strncpy(job->nspace, nspace, PMIX_MAX_NSLEN);
1212+
(void)strncpy(job->nspace, array[n].nspace, PMIX_MAX_NSLEN);
12091213
job->jobid = jobid;
12101214
opal_list_append(&mca_pmix_pmix120_component.jobids, &job->super);
12111215
}

opal/mca/pmix/pmix120/pmix_pmix120.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ static void notify(pmix_status_t status,
196196
for (n=1; n < ninfo; n++) {
197197
iptr = OBJ_NEW(opal_value_t);
198198
iptr->key = strdup(info[n].key);
199-
pmix120_value_unload(iptr, &info[n].value);
199+
(void)pmix120_value_unload(iptr, &info[n].value);
200200
opal_list_append(&cd->info, &iptr->super);
201201
}
202202

0 commit comments

Comments
 (0)