From d806014009624e76bc252b2e09da19b62559655f Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 7 Aug 2012 17:23:01 -0500 Subject: [PATCH] FS-4079 try this --- src/mod/endpoints/mod_sofia/sofia.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 99f42169f1..08f0686625 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -972,7 +972,13 @@ static void our_sofia_event_callback(nua_event_t event, if (sofia_private && sofia_private->is_call && sofia_private->de) { sofia_dispatch_event_t *qde = sofia_private->de; sofia_private->de = NULL; - sofia_process_dispatch_event(&qde); + + if (event == nua_i_cancel) { + nua_destroy_event(qde->event); + su_free(nh->nh_home, qde); + } else { + sofia_process_dispatch_event(&qde); + } } profile->last_sip_event = switch_time_now();