diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 47d5ca347..578313794 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -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){ diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index e43135e3d..84b64621c 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -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; }