fix(proxy): avoid memory leak

This commit is contained in:
Ronan Abhamon 2017-09-05 16:05:35 +02:00
parent 1f46a5677f
commit f03164f2f7
2 changed files with 6 additions and 8 deletions

View file

@ -425,8 +425,6 @@ void linphone_proxy_config_stop_refreshing(LinphoneProxyConfig * cfg){
/*with udp, there is a risk of port reuse, so I prefer to not do anything for now*/ /*with udp, there is a risk of port reuse, so I prefer to not do anything for now*/
if (contact_addr) { if (contact_addr) {
if (linphone_address_get_transport(contact_addr) != LinphoneTransportUdp) { if (linphone_address_get_transport(contact_addr) != LinphoneTransportUdp) {
/*need to save current contact in order to reset is later*/
linphone_address_ref(contact_addr);
if (cfg->pending_contact) if (cfg->pending_contact)
linphone_address_unref(cfg->pending_contact); linphone_address_unref(cfg->pending_contact);
cfg->pending_contact=contact_addr; cfg->pending_contact=contact_addr;