From 8cdbcae27a2282fa3f8adfc04bb5a77ce28dbce6 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Wed, 26 Jun 2013 17:43:07 +0200 Subject: [PATCH] fix bad unref during out of subscribe notify --- coreapi/bellesip_sal/sal_op_events.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coreapi/bellesip_sal/sal_op_events.c b/coreapi/bellesip_sal/sal_op_events.c index a1a88fec8..e454ab293 100644 --- a/coreapi/bellesip_sal/sal_op_events.c +++ b/coreapi/bellesip_sal/sal_op_events.c @@ -123,10 +123,11 @@ static void handle_notify(SalOp *op, belle_sip_request_t *req, const char *event ms_message("Outgoing subscription terminated by remote [%s]",sal_op_get_to(op)); } else sub_state=SalSubscribeActive; - + sal_op_ref(op); op->base.root->callbacks.notify(op,sub_state,eventname,body); resp=sal_op_create_response_from_request(op,req,200); belle_sip_server_transaction_send_response(server_transaction,resp); + sal_op_unref(op); } static void subscribe_process_request_event(void *op_base, const belle_sip_request_event_t *event) {