[vlc-commits] Simple: fix memleak on quit
Jean-Baptiste Kempf
git at videolan.org
Sun Apr 14 23:33:12 CEST 2013
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Apr 14 23:32:44 2013 +0200| [165f575d6012f86464c1cd3fee8778f9cb0d2957] | committer: Jean-Baptiste Kempf
Simple: fix memleak on quit
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=165f575d6012f86464c1cd3fee8778f9cb0d2957
---
modules/audio_filter/channel_mixer/simple.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/modules/audio_filter/channel_mixer/simple.c b/modules/audio_filter/channel_mixer/simple.c
index 59572eb..9292adf 100644
--- a/modules/audio_filter/channel_mixer/simple.c
+++ b/modules/audio_filter/channel_mixer/simple.c
@@ -39,13 +39,14 @@
* Module descriptor
*****************************************************************************/
static int OpenFilter( vlc_object_t * );
+static void CloseFilter( vlc_object_t * );
vlc_module_begin ()
set_description( N_("Audio filter for simple channel mixing") )
set_category( CAT_AUDIO )
set_subcategory( SUBCAT_AUDIO_MISC )
set_capability( "audio converter", 10 )
- set_callbacks( OpenFilter, NULL )
+ set_callbacks( OpenFilter, CloseFilter );
vlc_module_end ()
/*****************************************************************************
@@ -302,6 +303,13 @@ static int OpenFilter( vlc_object_t *p_this )
return VLC_SUCCESS;
}
+static void CloseFilter( vlc_object_t *p_this )
+{
+ filter_t *p_filter = (filter_t *) p_this;
+ filter_sys_t *p_sys = p_filter->p_sys;
+ free( p_sys );
+}
+
/*****************************************************************************
* Filter:
*****************************************************************************/
More information about the vlc-commits
mailing list