From f4e593f7b51f7cb30986186c187cff939c82d86d Mon Sep 17 00:00:00 2001
From: James Almer <jamrial@gmail.com>
Date: Wed, 6 Sep 2017 13:03:29 -0300
Subject: [PATCH] avcodec/audiotoolboxdec: use av_freep()

This prevents leaving dangling pointers.
---
 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;
 }