From 696ef23c5d997c56e5fe0daaaf4b382832d35baf Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Duraffort?= Date: Thu, 31 Jul 2008 13:23:58 +0200 Subject: [PATCH] control http: fix memleak. --- modules/control/http/http.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/control/http/http.c b/modules/control/http/http.c index eed8ceabb0..54cce0bfa7 100644 --- a/modules/control/http/http.c +++ b/modules/control/http/http.c @@ -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 ); -- 2.39.2