Skip to content

Commit e25e69d

Browse files
author
Ralph Castain
committed
Resolve Coverity issues
Signed-off-by: Ralph Castain <[email protected]>
1 parent dc7d2f5 commit e25e69d

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

opal/mca/pmix/pmix2x/pmix2x.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,13 @@ int pmix2x_value_unload(opal_value_t *kv,
945945
if (PMIX_INFO == v->data.darray->type) {
946946
pmix_info_t *iptr = (pmix_info_t*)v->data.darray->array;
947947
ival->key = strdup(iptr[n].key);
948-
pmix2x_value_unload(ival, &iptr[n].value);
948+
rc = pmix2x_value_unload(ival, &iptr[n].value);
949+
if (OPAL_SUCCESS != rc) {
950+
OPAL_LIST_RELEASE(lt);
951+
kv->type = OPAL_UNDEF;
952+
kv->data.ptr = NULL;
953+
break;
954+
}
949955
}
950956
}
951957
break;

orte/orted/pmix/pmix_server_gen.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,12 +544,11 @@ static void _query(int sd, short args, void *cbdata)
544544
}
545545

546546
/* scan the qualifiers */
547+
local_only = false;
547548
OPAL_LIST_FOREACH(kv, &q->qualifiers, opal_value_t) {
548549
if (0 == strcmp(kv->key, OPAL_PMIX_QUERY_LOCAL_ONLY)) {
549550
if (OPAL_UNDEF == kv->type || kv->data.flag) {
550551
local_only = true;
551-
} else {
552-
local_only = false;
553552
}
554553
} else if (0 == strcmp(kv->key, OPAL_PMIX_PROCID)) {
555554
/* save this directive on our list of targets */

orte/orted/pmix/pmix_server_register_fns.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,9 @@ int orte_pmix_server_register_nspace(orte_job_t *jdata)
332332

333333
/* location, for local procs */
334334
if (node == mynode) {
335-
if (orte_get_attribute(&pptr->attributes, ORTE_PROC_CPU_BITMAP, (void**)&tmp, OPAL_STRING)) {
335+
tmp = NULL;
336+
if (orte_get_attribute(&pptr->attributes, ORTE_PROC_CPU_BITMAP, (void**)&tmp, OPAL_STRING) &&
337+
NULL != tmp) {
336338
kv = OBJ_NEW(opal_value_t);
337339
kv->key = strdup(OPAL_PMIX_LOCALITY_STRING);
338340
kv->type = OPAL_STRING;

0 commit comments

Comments
 (0)