From: Michael Niedermayer <[email protected]>

Found-by: Reimar Döffinger
Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavformat/oggdec.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index ae9da3a..46e4b9a 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -95,7 +95,7 @@ static int ogg_restore(AVFormatContext *s, int discard)
     if (!discard) {
 
         for (i = 0; i < ogg->nstreams; i++)
-            av_free(ogg->streams[i].buf);
+            av_freep(&ogg->streams[i].buf);
 
         avio_seek(bc, ost->pos, SEEK_SET);
         ogg->curidx   = ost->curidx;
@@ -536,14 +536,14 @@ static int ogg_read_close(AVFormatContext *s)
     int i;
 
     for (i = 0; i < ogg->nstreams; i++) {
-        av_free(ogg->streams[i].buf);
+        av_freep(&ogg->streams[i].buf);
         if (ogg->streams[i].codec &&
             ogg->streams[i].codec->cleanup) {
             ogg->streams[i].codec->cleanup(s, i);
         }
-        av_free(ogg->streams[i].private);
+        av_freep(&ogg->streams[i].private);
     }
-    av_free(ogg->streams);
+    av_freep(&ogg->streams);
     return 0;
 }
 
-- 
1.8.1.4

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

Reply via email to