From: Limin Wang <lance.lmw...@gmail.com>

Signed-off-by: Limin Wang <lance.lmw...@gmail.com>
---
 libavformat/rl2.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavformat/rl2.c b/libavformat/rl2.c
index d847d9aaa8..3d38ffe8ba 100644
--- a/libavformat/rl2.c
+++ b/libavformat/rl2.c
@@ -163,9 +163,9 @@ static av_cold int rl2_read_header(AVFormatContext *s)
     chunk_offset = av_malloc(frame_count * sizeof(uint32_t));
 
     if(!chunk_size || !audio_size || !chunk_offset){
-        av_free(chunk_size);
-        av_free(audio_size);
-        av_free(chunk_offset);
+        av_freep(&chunk_size);
+        av_freep(&audio_size);
+        av_freep(&chunk_offset);
         return AVERROR(ENOMEM);
     }
 
-- 
2.21.0

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to