[FFmpeg-cvslog] avformat/mpegtsenc: Use av_freep() to avoid leaving stale pointers in memory

Michael Niedermayer git at videolan.org
Sun Dec 21 19:33:53 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Dec 21 19:24:32 2014 +0100| [f7a4589b3670186991e5eb6e799176c95313d532] | committer: Michael Niedermayer

avformat/mpegtsenc: Use av_freep() to avoid leaving stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f7a4589b3670186991e5eb6e799176c95313d532
---

 libavformat/mpegtsenc.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 3b898da..8d0da0b 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -814,9 +814,9 @@ fail:
         service = ts->services[i];
         av_freep(&service->provider_name);
         av_freep(&service->name);
-        av_free(service);
+        av_freep(&service);
     }
-    av_free(ts->services);
+    av_freep(&ts->services);
     return ret;
 }
 
@@ -1417,9 +1417,9 @@ static int mpegts_write_end(AVFormatContext *s)
         service = ts->services[i];
         av_freep(&service->provider_name);
         av_freep(&service->name);
-        av_free(service);
+        av_freep(&service);
     }
-    av_free(ts->services);
+    av_freep(&ts->services);
 
     return 0;
 }



More information about the ffmpeg-cvslog mailing list