avformat/rtpdec_mpeg4: Use av_freep() to avoid leaving stale pointers in memory
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 24 Dec 2014 12:01:10 +0000 (13:01 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 24 Dec 2014 12:14:07 +0000 (13:14 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/rtpdec_mpeg4.c

index 6ab3e6478971a920d6ab03144ea06fadaa1dfbd9..9655d302a3acb7a847325ef519bddbd1e8de71dc 100644 (file)
@@ -95,9 +95,9 @@ static PayloadContext *new_context(void)
 
 static void free_context(PayloadContext *data)
 {
-    av_free(data->au_headers);
-    av_free(data->mode);
-    av_free(data);
+    av_freep(&data->au_headers);
+    av_freep(&data->mode);
+    av_freep(&data);
 }
 
 static int parse_fmtp_config(AVCodecContext *codec, char *value)