avformat/rtpdec_xiph: use av_freep() to avoid leaving stale pointers in memory
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 23 Dec 2014 14:33:07 +0000 (15:33 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 23 Dec 2014 14:33:57 +0000 (15:33 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/rtpdec_xiph.c

index dc34f9e224197060938cb4605e85232b75a84d87..53b49752787a3193b38ec104be6487dea0400af0 100644 (file)
@@ -67,8 +67,8 @@ static inline void free_fragment_if_needed(PayloadContext * data)
 static void xiph_free_context(PayloadContext * data)
 {
     free_fragment_if_needed(data);
-    av_free(data->split_buf);
-    av_free(data);
+    av_freep(&data->split_buf);
+    av_freep(&data);
 }
 
 static av_cold int xiph_vorbis_init(AVFormatContext *ctx, int st_index,