From f9ddaa35c7d9476022466672900b099f31587b14 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 8 Jan 2015 20:08:24 +0100 Subject: [PATCH] avformat/rtpenc_chain: Use avio_closep() to avoid leaving stale pointers in memory Signed-off-by: Michael Niedermayer --- libavformat/rtpenc_chain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rtpenc_chain.c b/libavformat/rtpenc_chain.c index b2aa12471f..302c14c11a 100644 --- a/libavformat/rtpenc_chain.c +++ b/libavformat/rtpenc_chain.c @@ -89,7 +89,7 @@ int ff_rtp_chain_mux_open(AVFormatContext **out, AVFormatContext *s, if (ret) { if (handle && rtpctx->pb) { - avio_close(rtpctx->pb); + avio_closep(&rtpctx->pb); } else if (rtpctx->pb) { uint8_t *ptr; avio_close_dyn_buf(rtpctx->pb, &ptr);