From e360d030b3620dd7dfdfb635b4254af7620d9a4f Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 8 Jan 2015 20:08:24 +0100 Subject: [PATCH] avformat/rtsp: Use avio_closep() to avoid leaving stale pointers in memory Signed-off-by: Michael Niedermayer --- libavformat/rtsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 7276b79407..c9ffba468a 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -684,7 +684,7 @@ void ff_rtsp_undo_setup(AVFormatContext *s, int send_packets) avio_close_dyn_buf(rtpctx->pb, &ptr); av_free(ptr); } else { - avio_close(rtpctx->pb); + avio_closep(&rtpctx->pb); } avformat_free_context(rtpctx); } else if (CONFIG_RTPDEC && rt->transport == RTSP_TRANSPORT_RDT)