From 2959a612326c5e473518eb91c4b66020468a11fe Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Fri, 9 Jan 2015 13:39:06 +0100
Subject: [PATCH] avformat/utils: Use avio_closep() to avoid leaving stale
 pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
---
 libavformat/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 75819570e9..cb8b42b9c9 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -496,7 +496,7 @@ fail:
     ff_id3v2_free_extra_meta(&id3v2_extra_meta);
     av_dict_free(&tmp);
     if (s->pb && !(s->flags & AVFMT_FLAG_CUSTOM_IO))
-        avio_close(s->pb);
+        avio_closep(&s->pb);
     avformat_free_context(s);
     *ps = NULL;
     return ret;