oggdec: use av_freep() instead of av_free()
[ffmpeg.git] / libavformat / oggdec.c
index ce1152d3c29362b020e1b2a8a571b32d170f7ecc..d2725792e9ace3563e8133b666cad0e82f5ad53e 100644 (file)
@@ -245,8 +245,8 @@ ogg_read_page (AVFormatContext * s, int *str)
                 int n;
 
                 for (n = 0; n < ogg->nstreams; n++) {
-                    av_free(ogg->streams[n].buf);
-                    av_free(ogg->streams[n].private);
+                    av_freep(&ogg->streams[n].buf);
+                    av_freep(&ogg->streams[n].private);
                 }
                 ogg->curidx   = -1;
                 ogg->nstreams = 0;