Commit cec4e1c7 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'd2771a1d'

* commit 'd2771a1d':
  rtpproto: Free the addrinfo pointer on failure
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 5753d967 d2771a1d
......@@ -232,8 +232,10 @@ static void rtp_parse_addr_list(URLContext *h, char *buf,
ai = rtp_resolve_host(p, 0, SOCK_DGRAM, AF_UNSPEC, 0);
if (ai) {
source_addr = av_mallocz(sizeof(struct sockaddr_storage));
if (!source_addr)
if (!source_addr) {
freeaddrinfo(ai);
break;
}
memcpy(source_addr, ai->ai_addr, ai->ai_addrlen);
freeaddrinfo(ai);
......
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