diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-12-23 15:34:29 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-23 15:34:29 +0100 |
commit | bb858e67e50aee2811b697d2b3d88127dbada26f (patch) | |
tree | 9559a1e34b252716324c586bc88bf9f1a6c113b9 /libavformat/rtpdec_latm.c | |
parent | ba8d2c90cd986a007fabea9b6358bb3f6bffd3a5 (diff) | |
download | ffmpeg-bb858e67e50aee2811b697d2b3d88127dbada26f.tar.gz |
avformat/rtpdec_latm: Use av_freep() to avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtpdec_latm.c')
-rw-r--r-- | libavformat/rtpdec_latm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/rtpdec_latm.c b/libavformat/rtpdec_latm.c index 389648253a..c3cb2f28d0 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; |