From 9942e6a50dfa326ec4036bedaf2eaa89d6c7f1cd Mon Sep 17 00:00:00 2001 From: Santiago Carot-Nemesio Date: Wed, 14 Dec 2011 11:11:52 +0100 Subject: [PATCH] hdp: Fix memory leak aborting data channel connections Use GDestroyNotify function to decrease the reference counter of the data channel provided in the callback when abort operation is invoked in MCAP. --- health/hdp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/health/hdp.c b/health/hdp.c index 490a5f8ec..acd35e4c4 100644 --- a/health/hdp.c +++ b/health/hdp.c @@ -1783,8 +1783,8 @@ fail: /* Send abort request because remote side is now in PENDING */ /* state. Then we have to delete it because we couldn't */ /* register the HealthChannel interface */ - if (!mcap_mdl_abort(mdl, abort_and_del_mdl_cb, mcap_mdl_ref(mdl), NULL, - &gerr)) { + if (!mcap_mdl_abort(mdl, abort_and_del_mdl_cb, mcap_mdl_ref(mdl), + (GDestroyNotify) mcap_mdl_unref, &gerr)) { error("%s", gerr->message); g_error_free(gerr); mcap_mdl_unref(mdl); -- 2.47.3