Fix 2 memory leaks.

This commit is contained in:
Ghislain MARY 2014-09-09 10:29:32 +02:00
parent f07be6ec9e
commit 5283278eef
2 changed files with 2 additions and 0 deletions

View file

@ -658,6 +658,7 @@ static void linphone_call_get_local_ip(LinphoneCall *call, const LinphoneAddress
if (err == 0) {
dest = domain;
}
if (res != NULL) freeaddrinfo(res);
}
if (linphone_core_get_firewall_policy(call->core)==LinphonePolicyUseNatAddress
&& (ip=linphone_core_get_nat_address_resolved(call->core))!=NULL){

View file

@ -3528,6 +3528,7 @@ static int remote_address_compare(LinphoneCall *call, const LinphoneAddress *rad
LinphoneCall *linphone_core_get_call_by_remote_address(LinphoneCore *lc, const char *remote_address){
LinphoneAddress *raddr=linphone_address_new(remote_address);
MSList *elem=ms_list_find_custom(lc->calls,(int (*)(const void*,const void *))remote_address_compare,raddr);
linphone_address_unref(raddr);
if (elem) return (LinphoneCall*) elem->data;
return NULL;
}