avformat/rtpproto: Use av_freep() to avoid leaving stale pointers in memory
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 24 Dec 2014 12:00:34 +0000 (13:00 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 24 Dec 2014 12:14:07 +0000 (13:14 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/rtpproto.c

index 88a39796a9a025ac72f1e219ed9ff1b55e72d476..b6b89247e7bd3240876e2fb15c84b6b0c3062b76 100644 (file)
@@ -510,10 +510,10 @@ static int rtp_close(URLContext *h)
     int i;
 
     for (i = 0; i < s->nb_ssm_include_addrs; i++)
-        av_free(s->ssm_include_addrs[i]);
+        av_freep(&s->ssm_include_addrs[i]);
     av_freep(&s->ssm_include_addrs);
     for (i = 0; i < s->nb_ssm_exclude_addrs; i++)
-        av_free(s->ssm_exclude_addrs[i]);
+        av_freep(&s->ssm_exclude_addrs[i]);
     av_freep(&s->ssm_exclude_addrs);
 
     ffurl_close(s->rtp_hd);