[vlc-commits] avformat: demux: Fix leak on error

Hannes Domani git at videolan.org
Thu Sep 7 13:46:02 CEST 2017


vlc | branch: master | Hannes Domani <ssbssa at yahoo.de> | Thu Sep  7 13:13:31 2017 +0200| [591b2d2e5ba681b38ea2346faf7545867b176615] | committer: Hugo Beauzée-Luyssen

avformat: demux: Fix leak on error

Reverts 4f00d4a11c436902b93d55a5a279be38a3851226 and replaces it with a
correct fix.
This reverts commit 4f00d4a11c436902b93d55a5a279be38a3851226.

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

 modules/demux/avformat/demux.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c
index 356c73f1f7..783220df78 100644
--- a/modules/demux/avformat/demux.c
+++ b/modules/demux/avformat/demux.c
@@ -310,6 +310,7 @@ 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( pb->buffer );
         av_free( pb );
         p_sys->ic = NULL;
         free( psz_url );



More information about the vlc-commits mailing list