Skip to content

Commit 0f47310

Browse files
committed
pmix2x/pmix2x_client: plug misc memory leaks
Signed-off-by: Gilles Gouaillardet <[email protected]>
1 parent f4dc7e4 commit 0f47310

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

opal/mca/pmix/pmix2x/pmix2x_client.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,9 @@ int pmix2x_publish(opal_list_t *info)
585585
}
586586

587587
ret = PMIx_Publish(pinfo, sz);
588+
if (0 < sz) {
589+
PMIX_INFO_FREE(pinfo, sz);
590+
}
588591

589592
return pmix2x_convert_rc(ret);
590593
}
@@ -621,6 +624,9 @@ int pmix2x_publishnb(opal_list_t *info,
621624
}
622625

623626
ret = PMIx_Publish_nb(op->info, op->sz, opcbfunc, op);
627+
if (0 < op->sz) {
628+
PMIX_INFO_FREE(op->info, op->sz);
629+
}
624630

625631
return pmix2x_convert_rc(ret);
626632
}
@@ -931,6 +937,9 @@ int pmix2x_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid)
931937
job->jobid = *jobid;
932938
opal_list_append(&mca_pmix_pmix2x_component.jobids, &job->super);
933939
}
940+
if (0 < ninfo) {
941+
PMIX_INFO_FREE(pinfo, ninfo);
942+
}
934943
PMIX_APP_FREE(papps, napps);
935944

936945
return pmix2x_convert_rc(ret);

0 commit comments

Comments
 (0)