From ef9a19def1bb0ac28af4f1963a248959e46dee97 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Wed, 24 May 2017 12:08:41 +0200 Subject: [PATCH] small fix to avoid cfg->long_term_event double unref --- coreapi/proxy.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/coreapi/proxy.c b/coreapi/proxy.c index fc8519429..f6300e0ef 100644 --- a/coreapi/proxy.c +++ b/coreapi/proxy.c @@ -417,8 +417,11 @@ void linphone_proxy_config_stop_refreshing(LinphoneProxyConfig * cfg){ } if (cfg->long_term_event){ /*might probably do better*/ linphone_event_terminate(cfg->long_term_event); - linphone_event_unref(cfg->long_term_event); - cfg->long_term_event=NULL; + if (cfg->long_term_event) { + linphone_event_unref(cfg->long_term_event); /*probably useless as cfg->long_term_event is already unref in linphone_proxy_config_notify_publish_state_changed. To be check with Ghislain*/ + cfg->long_term_event=NULL; + } + } if (cfg->op){ sal_op_release(cfg->op);