X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Faccess_output%2Fhttp.c;h=fff220d4a19b88b343063083dcf9bf48fc4cd0a9;hb=a5c83dda798f93cc7a76bbb50d89352117e6ec46;hp=77e4a8042b97261c1f511f8b1258521d9cb51a7a;hpb=13ae40b0efc4f1b1ce205d9a057537047fcab3f4;p=vlc diff --git a/modules/access_output/http.c b/modules/access_output/http.c index 77e4a8042b..fff220d4a1 100644 --- a/modules/access_output/http.c +++ b/modules/access_output/http.c @@ -30,7 +30,7 @@ # include "config.h" #endif -#include +#include #include #include #include @@ -123,7 +123,7 @@ vlc_module_end(); /***************************************************************************** * Exported prototypes *****************************************************************************/ -static const char *ppsz_sout_options[] = { +static const char *const ppsz_sout_options[] = { "user", "pwd", "mime", "cert", "key", "ca", "crl", NULL }; @@ -165,16 +165,13 @@ static int Open( vlc_object_t *p_this ) char *psz_user = NULL; char *psz_pwd = NULL; char *psz_mime = NULL; - const char *psz_cert = NULL, *psz_key = NULL, *psz_ca = NULL, + char *psz_cert = NULL, *psz_key = NULL, *psz_ca = NULL, *psz_crl = NULL; vlc_value_t val; if( !( p_sys = p_access->p_sys = malloc( sizeof( sout_access_out_sys_t ) ) ) ) - { - msg_Err( p_access, "Not enough memory" ); return VLC_ENOMEM ; - } config_ChainParse( p_access, SOUT_CFG_PREFIX, ppsz_sout_options, p_access->p_cfg ); @@ -244,6 +241,11 @@ static int Open( vlc_object_t *p_this ) psz_bind_addr, i_bind_port, psz_cert, psz_key, psz_ca, psz_crl ); + free( psz_cert ); + free( psz_key ); + free( psz_ca ); + free( psz_crl ); + if( p_sys->p_httpd_host == NULL ) { msg_Err( p_access, "cannot listen on %s:%d", @@ -312,7 +314,7 @@ static int Open( vlc_object_t *p_this ) if( psz_file_name && asprintf( &psz_txt, "path=%s", psz_file_name ) == -1 ) { - pl_Release( p_playlist ); + pl_Release( p_access ); free( psz_uri ); return VLC_ENOMEM; } @@ -326,7 +328,7 @@ static int Open( vlc_object_t *p_this ) if( p_sys->p_bonjour == NULL ) msg_Err( p_access, "unable to start requested Bonjour announce" ); - pl_Release( p_playlist ); + pl_Release( p_access ); } else p_sys->p_bonjour = NULL;