[vlc-commits] avformat: Fix potential double free

Hugo Beauzée-Luyssen git at videolan.org
Thu Sep 7 10:08:14 CEST 2017


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Sep  6 16:29:47 2017 +0200| [4f00d4a11c436902b93d55a5a279be38a3851226] | committer: Hugo Beauzée-Luyssen

avformat: Fix potential double free

avformat seems to take the ownership of this buffer, but it also seems
not to sometimes.
This does introduce a leak , but keeping it there definitely causes
crashes some other times.
If someone understands avformat/avio APIs, opinion welcome.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4f00d4a11c436902b93d55a5a279be38a3851226
---

 modules/demux/avformat/demux.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c
index c46ecb5d23..121e177f06 100644
--- a/modules/demux/avformat/demux.c
+++ b/modules/demux/avformat/demux.c
@@ -310,7 +310,6 @@ int OpenDemux( vlc_object_t *p_this )
     {
         msg_Err( p_demux, "Could not open %s: %s", psz_url,
                  vlc_strerror_c(AVUNERROR(error)) );
-        av_free( p_io_buffer );
         av_free( pb );
         p_sys->ic = NULL;
         free( psz_url );



More information about the vlc-commits mailing list