Skip to content

Commit b707d13

Browse files
committed
pmix114/pmix1_client: fix misc memory leaks
Fixes CID 1325146-1325149
1 parent 99fedcb commit b707d13

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

opal/mca/pmix/pmix114/pmix1_client.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ int pmix1_abort(int flag, const char *msg,
190190
}
191191
}
192192
if (NULL == job) {
193+
free(parray);
193194
return OPAL_ERR_NOT_FOUND;
194195
}
195196
(void)strncpy(parray[n].nspace, job->nspace, PMIX_MAX_NSLEN);
@@ -291,6 +292,7 @@ int pmix1_fence(opal_list_t *procs, int collect_data)
291292
}
292293
}
293294
if (NULL == job) {
295+
free(parray);
294296
return OPAL_ERR_NOT_FOUND;
295297
}
296298
(void)strncpy(parray[n].nspace, job->nspace, PMIX_MAX_NSLEN);
@@ -353,6 +355,7 @@ int pmix1_fencenb(opal_list_t *procs, int collect_data,
353355
}
354356
}
355357
if (NULL == job) {
358+
free(parray);
356359
return OPAL_ERR_NOT_FOUND;
357360
}
358361
(void)strncpy(parray[n].nspace, job->nspace, PMIX_MAX_NSLEN);
@@ -1063,6 +1066,7 @@ int pmix1_connect(opal_list_t *procs)
10631066
}
10641067
}
10651068
if (NULL == job) {
1069+
free(parray);
10661070
OPAL_ERROR_LOG(OPAL_ERR_NOT_FOUND);
10671071
return OPAL_ERR_NOT_FOUND;
10681072
}

0 commit comments

Comments
 (0)