From 2cfc12bcc64d47ab99e4ccad8c04d8722ada1995 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Fri, 3 Apr 2015 18:22:53 -0400 Subject: [PATCH] fix incorrect free order of ICE components fixes #95 --- daemon/ice.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/ice.c b/daemon/ice.c index 9ab3404c6..dcd7c0fd9 100644 --- a/daemon/ice.c +++ b/daemon/ice.c @@ -470,8 +470,6 @@ void ice_shutdown(struct ice_agent **agp) { obj_put(ag); } static void __ice_agent_free_components(struct ice_agent *ag) { - ice_candidates_free(&ag->remote_candidates); - ice_candidate_pairs_free(&ag->candidate_pairs); g_queue_clear(&ag->triggered); g_hash_table_destroy(ag->candidate_hash); g_hash_table_destroy(ag->pair_hash); @@ -482,6 +480,8 @@ static void __ice_agent_free_components(struct ice_agent *ag) { g_tree_destroy(ag->nominated_pairs); g_tree_destroy(ag->succeeded_pairs); g_tree_destroy(ag->valid_pairs); + ice_candidates_free(&ag->remote_candidates); + ice_candidate_pairs_free(&ag->candidate_pairs); } static void __ice_agent_free(void *p) { struct ice_agent *ag = p;