Commit 06e9ebe1 authored by Simon Morlat's avatar Simon Morlat
Browse files

fix crash because addrinfo chains were not properly freed.

parent ee374e53
......@@ -293,10 +293,11 @@ void belle_sip_freeaddrinfo(struct addrinfo *res){
if (it->ai_flags & AI_V4MAPPED){
allocated_by_belle_sip=it;
if (previt) previt->ai_next=NULL;
break;
}
previt=it;
}
freeaddrinfo(res);
if (res!=allocated_by_belle_sip) freeaddrinfo(res);
if (allocated_by_belle_sip) _belle_sip_freeaddrinfo(allocated_by_belle_sip);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment