From 587299ce03366dc142d5fa36fc71e1da11d9fcfd Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Thu, 19 Feb 2015 17:13:35 +0100 Subject: [PATCH] fix crash in case of transport change when call is on error --- coreapi/bellesip_sal/sal_op_call.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/coreapi/bellesip_sal/sal_op_call.c b/coreapi/bellesip_sal/sal_op_call.c index 428c27bff..58b7e9290 100644 --- a/coreapi/bellesip_sal/sal_op_call.c +++ b/coreapi/bellesip_sal/sal_op_call.c @@ -217,7 +217,8 @@ static void call_process_response(void *op_base, const belle_sip_response_event_ dialog_state=dialog ? belle_sip_dialog_get_state(dialog) : BELLE_SIP_DIALOG_NULL; method=belle_sip_request_get_method(req); ms_message("Op [%p] receiving call response [%i], dialog is [%p] in state [%s]",op,code,dialog,belle_sip_dialog_state_to_string(dialog_state)); - + /*to make sure no cb will destroy op*/ + sal_op_ref(op); switch(dialog_state) { case BELLE_SIP_DIALOG_NULL: case BELLE_SIP_DIALOG_EARLY: { @@ -316,6 +317,7 @@ static void call_process_response(void *op_base, const belle_sip_response_event_ } break; } + sal_op_unref(op); } static void call_process_timeout(void *user_ctx, const belle_sip_timeout_event_t *event) {