[FFmpeg-cvslog] avcodec/audiotoolboxdec: use av_freep()
James Almer
git at videolan.org
Wed Sep 6 19:05:42 EEST 2017
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Wed Sep 6 13:03:29 2017 -0300| [f4e593f7b51f7cb30986186c187cff939c82d86d] | committer: James Almer
avcodec/audiotoolboxdec: use av_freep()
This prevents leaving dangling pointers.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f4e593f7b51f7cb30986186c187cff939c82d86d
---
libavcodec/audiotoolboxdec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/audiotoolboxdec.c b/libavcodec/audiotoolboxdec.c
index 97514368bf..607d3ba4d4 100644
--- a/libavcodec/audiotoolboxdec.c
+++ b/libavcodec/audiotoolboxdec.c
@@ -570,8 +570,8 @@ static av_cold int ffat_close_decoder(AVCodecContext *avctx)
AudioConverterDispose(at->converter);
av_packet_unref(&at->new_in_pkt);
av_packet_unref(&at->in_pkt);
- av_free(at->decoded_data);
- av_free(at->extradata);
+ av_freep(&at->decoded_data);
+ av_freep(&at->extradata);
return 0;
}
More information about the ffmpeg-cvslog
mailing list