From 4c3b4aa379bbdb64c4b0d840fd659dd6dd9031e0 Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Tue, 17 Aug 2010 00:42:24 +0200 Subject: cc: fix segfault due to incorrect call destruction Only destroy the link when invoking the MNCC_RELEASE-cfm primitive, on MNCC_RELEASE-ind destruction happends in MNCC_RELEASE-res. Signed-off-by: Patrick McHardy --- src/cc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/cc.c b/src/cc.c index a49aef2..4c68653 100644 --- a/src/cc.c +++ b/src/cc.c @@ -1325,6 +1325,10 @@ static void dect_mncc_release_cfm(struct dect_handle *dh, struct dect_call *call cc_debug(call, "MNCC_RELEASE-cfm"); dh->ops->cc_ops->mncc_release_cfm(dh, call, param); dect_ie_collection_put(dh, param); + + dect_call_disconnect_uplane(dh, call); + dect_transaction_close(dh, &call->transaction, DECT_DDL_RELEASE_NORMAL); + dect_call_destroy(dh, call); } static void dect_cc_rcv_release_com(struct dect_handle *dh, struct dect_call *call, @@ -1357,10 +1361,6 @@ static void dect_cc_rcv_release_com(struct dect_handle *dh, struct dect_call *ca } out: dect_msg_free(dh, &cc_release_com_msg_desc, &msg.common); - - dect_call_disconnect_uplane(dh, call); - dect_transaction_close(dh, &call->transaction, DECT_DDL_RELEASE_NORMAL); - dect_call_destroy(dh, call); } static void dect_mncc_iwu_info_ind(struct dect_handle *dh, struct dect_call *call, -- cgit v1.2.3