]> git.sesse.net Git - vlc/commitdiff
control http: fix memleak.
authorRémi Duraffort <ivoire@videolan.org>
Thu, 31 Jul 2008 11:23:58 +0000 (13:23 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Thu, 31 Jul 2008 11:23:58 +0000 (13:23 +0200)
modules/control/http/http.c

index eed8ceabb0166da7e90163170120d62c8df6f22f..54cce0bfa75cf51f11920d5c6d144427833f741e 100644 (file)
@@ -121,7 +121,7 @@ static int Open( vlc_object_t *p_this )
     intf_thread_t *p_intf = (intf_thread_t*)p_this;
     intf_sys_t    *p_sys;
     char          *psz_address;
-    const char    *psz_cert = NULL, *psz_key = NULL, *psz_ca = NULL,
+    char          *psz_cert = NULL, *psz_key = NULL, *psz_ca = NULL,
                   *psz_crl = NULL;
     int           i_port       = 0;
     char          *psz_src = NULL;
@@ -219,6 +219,11 @@ static int Open( vlc_object_t *p_this )
     p_sys->p_httpd_host = httpd_TLSHostNew( VLC_OBJECT(p_intf), psz_address,
                                             i_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_intf, "cannot listen on %s:%d", psz_address, i_port );