[vlc-devel] commit: Fix a memleak when parsing VLC_VAR_LIST ( Rémi Duraffort )
git version control
git at videolan.org
Fri Sep 26 20:21:01 CEST 2008
vlc | branch: 0.9-bugfix | Rémi Duraffort <ivoire at videolan.org> | Fri Sep 26 20:02:32 2008 +0200| [09780abc63a6bc4b81dfaddc6656a849924f8589] | committer: Rémi Duraffort
Fix a memleak when parsing VLC_VAR_LIST
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=09780abc63a6bc4b81dfaddc6656a849924f8589
---
src/misc/variables.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/misc/variables.c b/src/misc/variables.c
index 8771c44..d4c7ba6 100644
--- a/src/misc/variables.c
+++ b/src/misc/variables.c
@@ -1167,6 +1167,10 @@ void var_OptionParse( vlc_object_t *p_obj, const char *psz_option,
var_Set( p_obj, psz_name, val );
+ // If that's a list, remove all elements allocated
+ if( i_type == VLC_VAR_LIST )
+ FreeList( &val );
+
cleanup:
free( psz_name );
}
More information about the vlc-devel
mailing list