[vlc-commits] http: fix segmentation fault on error

Rémi Denis-Courmont git at videolan.org
Tue Apr 12 19:31:22 CEST 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Apr  8 12:35:50 2016 +0300| [a839f1834c1410ddfc58e74f4f137042ee90f625] | committer: Rémi Denis-Courmont

http: fix segmentation fault on error

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

 modules/access/http.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/access/http.c b/modules/access/http.c
index 075cd42..f05f3a8 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -230,6 +230,7 @@ static int Open( vlc_object_t *p_this )
     p_sys->offset = 0;
     p_sys->size = 0;
     p_access->info.b_eof  = false;
+    p_access->p_sys = p_sys;
 
     /* Only forward an store cookies if the corresponding option is activated */
     if( var_CreateGetBool( p_access, "http-forward-cookies" ) )
@@ -351,8 +352,6 @@ static int Open( vlc_object_t *p_this )
     p_sys->b_reconnect = var_InheritBool( p_access, "http-reconnect" );
     p_sys->b_continuous = var_InheritBool( p_access, "http-continuous" );
 
-    p_access->p_sys = p_sys;
-
     if( vlc_credential_get( &credential, p_access, NULL, NULL, NULL, NULL ) )
     {
         p_sys->url.psz_username = (char *) credential.psz_username;



More information about the vlc-commits mailing list