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

Michael Niedermayer git at videolan.org
Tue Dec 23 16:03:56 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Dec 23 15:34:29 2014 +0100| [bb858e67e50aee2811b697d2b3d88127dbada26f] | committer: Michael Niedermayer

avformat/rtpdec_latm: 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=bb858e67e50aee2811b697d2b3d88127dbada26f
---

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

diff --git a/libavformat/rtpdec_latm.c b/libavformat/rtpdec_latm.c
index 3896482..c3cb2f2 100644
--- a/libavformat/rtpdec_latm.c
+++ b/libavformat/rtpdec_latm.c
@@ -45,7 +45,7 @@ static void latm_free_context(PayloadContext *data)
         avio_close_dyn_buf(data->dyn_buf, &p);
         av_free(p);
     }
-    av_free(data->buf);
+    av_freep(&data->buf);
     av_free(data);
 }
 
@@ -72,7 +72,7 @@ static int latm_parse_packet(AVFormatContext *ctx, PayloadContext *data,
 
         if (!(flags & RTP_FLAG_MARKER))
             return AVERROR(EAGAIN);
-        av_free(data->buf);
+        av_freep(&data->buf);
         data->len = avio_close_dyn_buf(data->dyn_buf, &data->buf);
         data->dyn_buf = NULL;
         data->pos = 0;



More information about the ffmpeg-cvslog mailing list