make sure publish listeners do no try to access proxies during deletions

This commit is contained in:
Jehan Monnier 2017-05-23 12:40:35 +02:00
parent 3a850c1a03
commit 82f2275549

View file

@ -5819,7 +5819,9 @@ void sip_config_uninit(LinphoneCore *lc)
}
if (i>=20) ms_warning("Cannot complete unregistration, giving up");
}
config->proxies=bctbx_list_free_with_data(config->proxies,(void (*)(void*)) _linphone_proxy_config_release);
elem = config->proxies;
config->proxies=NULL; /*to make sure proxies cannot be refferenced during deletion*/
bctbx_list_free_with_data(elem,(void (*)(void*)) _linphone_proxy_config_release);
config->deleted_proxies=bctbx_list_free_with_data(config->deleted_proxies,(void (*)(void*)) _linphone_proxy_config_release);