On Sat, 18 Oct 2014, Vittorio Giovara wrote:

From: Luca Barbato <[email protected]>

CC: [email protected]
Bug-Id: CID 1238797
---
libavformat/rtpproto.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/rtpproto.c b/libavformat/rtpproto.c
index 0f31539..d5ecfc8 100644
--- a/libavformat/rtpproto.c
+++ b/libavformat/rtpproto.c
@@ -231,8 +231,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);
--
1.9.3 (Apple Git-50)

Ok

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to