Commit a4cd5be5 authored by Pavan Balaji's avatar Pavan Balaji
Browse files

[svn-r6971] Squash valgrind memory leak warnings.

parent a8bfd5c0
......@@ -338,11 +338,8 @@ HYD_status HYD_pmci_wait_for_completion(int timeout)
HYDU_ERR_POP(status, "error waiting for event\n");
}
if (pg_scratch) {
HYD_pmcd_free_pmi_kvs_list(pg_scratch->kvs);
HYDU_FREE(pg_scratch);
pg_scratch = NULL;
}
status = HYD_pmcd_pmi_free_pg_scratch(pg);
HYDU_ERR_POP(status, "error freeing PG scratch space\n");
}
fn_exit:
......
......@@ -406,3 +406,30 @@ HYD_status HYD_pmcd_pmi_alloc_pg_scratch(struct HYD_pg *pg)
fn_fail:
goto fn_exit;
}
HYD_status HYD_pmcd_pmi_free_pg_scratch(struct HYD_pg *pg)
{
struct HYD_pmcd_pmi_pg_scratch *pg_scratch;
HYD_status status = HYD_SUCCESS;
HYDU_FUNC_ENTER();
if (pg->pg_scratch) {
pg_scratch = pg->pg_scratch;
if (pg_scratch->ecount)
HYDU_FREE(pg_scratch->ecount);
HYD_pmcd_free_pmi_kvs_list(pg_scratch->kvs);
HYDU_FREE(pg_scratch);
pg->pg_scratch = NULL;
}
fn_exit:
HYDU_FUNC_EXIT();
return status;
fn_fail:
goto fn_exit;
}
......@@ -13,5 +13,6 @@
HYD_status HYD_pmcd_pmi_fill_in_proxy_args(char **proxy_args, char *control_port, int pgid);
HYD_status HYD_pmcd_pmi_fill_in_exec_launch_info(struct HYD_pg *pg);
HYD_status HYD_pmcd_pmi_alloc_pg_scratch(struct HYD_pg *pg);
HYD_status HYD_pmcd_pmi_free_pg_scratch(struct HYD_pg *pg);
#endif /* PMISERV_UTILS_H_INCLUDED */
......@@ -173,6 +173,9 @@ void HYDU_free_proxy_list(struct HYD_proxy *proxy_list)
if (proxy->node.hostname)
HYDU_FREE(proxy->node.hostname);
if (proxy->node.local_binding)
HYDU_FREE(proxy->node.local_binding);
if (proxy->exec_launch_info) {
HYDU_free_strlist(proxy->exec_launch_info);
HYDU_FREE(proxy->exec_launch_info);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment