From: Gildas Bazin Date: Thu, 15 Jan 2004 22:58:12 +0000 (+0000) Subject: * modules/access_output/http.c: fixed small mem leak and mem corruption. X-Git-Tag: 0.7.1~500 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=e99c3250486ffa848b07e5ae7a2b4dd734c2e0ef;p=vlc * modules/access_output/http.c: fixed small mem leak and mem corruption. --- diff --git a/modules/access_output/http.c b/modules/access_output/http.c index d46ced6886..641c439702 100644 --- a/modules/access_output/http.c +++ b/modules/access_output/http.c @@ -2,7 +2,7 @@ * http.c ***************************************************************************** * Copyright (C) 2001-2003 VideoLAN - * $Id: http.c,v 1.8 2003/12/06 22:50:08 jpsaman Exp $ + * $Id: http.c,v 1.9 2004/01/15 22:58:12 gbazin Exp $ * * Authors: Laurent Aimar * @@ -191,6 +191,10 @@ static int Open( vlc_object_t *p_this ) strcpy( psz_file_name, "/" ); strcat( psz_file_name, p ); } + else + { + psz_file_name = strdup( psz_file_name ); + } p_sys->p_httpd = httpd_Find( VLC_OBJECT(p_access), VLC_TRUE ); if( !p_sys->p_httpd ) @@ -246,6 +250,9 @@ static int Open( vlc_object_t *p_this ) return( VLC_EGENERIC ); } + free( psz_file_name ); + free( psz_name ); + p_sys->i_header_allocated = 1024; p_sys->i_header_size = 0; p_sys->p_header = malloc( p_sys->i_header_allocated );