Commit 26ad94db authored by Gildas Bazin's avatar Gildas Bazin

* src/misc/variables.c: fixed memleak.
* include/vlc_common.h: use pragma to disable useless MSVC warnings.
parent 76922217
......@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vlc_common.h,v 1.109 2004/02/23 20:34:47 gbazin Exp $
* $Id: vlc_common.h,v 1.110 2004/02/29 13:08:56 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
......@@ -43,6 +43,8 @@
# undef HAVE_STDINT_H
# undef HAVE_INTTYPES_H
# undef off_t
#elif defined( _MSC_VER )
# pragma warning( disable : 4244 )
#endif
#include "vlc_config.h"
......
......@@ -2,7 +2,7 @@
* variables.c: routines for object variables handling
*****************************************************************************
* Copyright (C) 2002-2004 VideoLAN
* $Id: variables.c,v 1.37 2004/01/25 17:16:06 zorglub Exp $
* $Id: variables.c,v 1.38 2004/02/29 13:08:56 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -575,6 +575,18 @@ int __var_Change( vlc_object_t *p_this, const char *psz_name,
break;
case VLC_VAR_FREELIST:
FreeList( p_val );
if( p_val2 && p_val2->p_list )
{
for( i = 0; i < p_val2->p_list->i_count; i++ )
if( p_val2->p_list->p_values[i].psz_string )
free( p_val2->p_list->p_values[i].psz_string );
if( p_val2->p_list->i_count )
{
free( p_val2->p_list->p_values );
free( p_val2->p_list->pi_types );
}
free( p_val2->p_list );
}
break;
case VLC_VAR_SETTEXT:
if( p_var->psz_text ) free( p_var->psz_text );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment