diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-20 23:03:36 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-20 23:05:06 +0200 |
commit | cec4e1c7c712dbb20170a94ae4903f8a321433b7 (patch) | |
tree | af416deb399e64fb5c2edca6e440ba18f42a51cb /libavformat | |
parent | 5753d96771450ea4bf978164e8ba76fbdf9c55ee (diff) | |
parent | d2771a1dc0a3695e8873adc16d068077f2417eea (diff) | |
download | ffmpeg-cec4e1c7c712dbb20170a94ae4903f8a321433b7.tar.gz |
Merge commit 'd2771a1dc0a3695e8873adc16d068077f2417eea'
* commit 'd2771a1dc0a3695e8873adc16d068077f2417eea':
rtpproto: Free the addrinfo pointer on failure
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/rtpproto.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/rtpproto.c b/libavformat/rtpproto.c index a8cbd97708..71e6f0320b 100644 --- a/libavformat/rtpproto.c +++ b/libavformat/rtpproto.c @@ -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); |