[vlc-devel] commit: Fix a (really) small memleak (even if i_count is 0, some memory is allocated ( Rémi Duraffort )
git version control
git at videolan.org
Wed May 20 18:54:00 CEST 2009
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Wed May 20 13:00:52 2009 +0200| [1c15d4ad0c099d4f415918a675e9a7786c48cd80] | committer: Rémi Duraffort
Fix a (really) small memleak (even if i_count is 0, some memory is allocated
for the strucure).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1c15d4ad0c099d4f415918a675e9a7786c48cd80
---
src/control/media_player.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/control/media_player.c b/src/control/media_player.c
index 98ca4b3..fe80925 100644
--- a/src/control/media_player.c
+++ b/src/control/media_player.c
@@ -1241,7 +1241,10 @@ libvlc_track_description_t *
var_Change( p_input, psz_variable, VLC_VAR_GETLIST, &val_list, &text_list);
if( val_list.p_list->i_count <= 0 ) /* no tracks */
+ {
+ var_Change( p_input, psz_variable, VLC_VAR_FREELIST, &val_list, &text_list);
return NULL;
+ }
libvlc_track_description_t *p_track_description, *p_actual, *p_previous;
p_track_description = ( libvlc_track_description_t * )
More information about the vlc-devel
mailing list