OSDN Git Service

udp: use av_freep() instead of av_free()
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 27 Jun 2012 23:09:43 +0000 (01:09 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 28 Jun 2012 08:12:04 +0000 (10:12 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/udp.c

index e444a7d..5b5c7cb 100644 (file)
@@ -637,7 +637,7 @@ static int udp_open(URLContext *h, const char *uri, int flags)
     }
 
     for (i = 0; i < num_sources; i++)
-        av_free(sources[i]);
+        av_freep(&sources[i]);
 
     s->udp_fd = udp_fd;
 
@@ -678,7 +678,7 @@ static int udp_open(URLContext *h, const char *uri, int flags)
         closesocket(udp_fd);
     av_fifo_free(s->fifo);
     for (i = 0; i < num_sources; i++)
-        av_free(sources[i]);
+        av_freep(&sources[i]);
     return AVERROR(EIO);
 }