[vlc-commits] archive: Fix leak on error

Hugo Beauzée-Luyssen git at videolan.org
Mon Feb 27 12:02:29 CET 2017


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Feb 27 12:01:43 2017 +0100| [60d6dc700e3ac3fbbfb5d81a422f83fcabd46af7] | committer: Hugo Beauzée-Luyssen

archive: Fix leak on error

CID #1413318

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

 modules/stream_extractor/archive.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/stream_extractor/archive.c b/modules/stream_extractor/archive.c
index 6849459..efdd4e4 100644
--- a/modules/stream_extractor/archive.c
+++ b/modules/stream_extractor/archive.c
@@ -228,7 +228,10 @@ static int archive_push_resource( private_sys_t* p_sys,
     p_callback_data->p_sys    = p_sys;
 
     if( unlikely( !p_callback_data->psz_url && psz_url ) )
+    {
+        free( p_callback_data );
         goto error;
+    }
 
     pp_callback_data[ p_sys->i_callback_data++ ] = p_callback_data;
     p_sys->pp_callback_data = pp_callback_data;



More information about the vlc-commits mailing list