[vlc-commits] lua: fix object leaks.
Rémi Duraffort
git at videolan.org
Sat Jun 18 15:31:28 CEST 2011
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sat Jun 18 15:27:48 2011 +0200| [4fda5acdc7e7c7539abd8f20ba3b7d31334de645] | committer: Rémi Duraffort
lua: fix object leaks.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4fda5acdc7e7c7539abd8f20ba3b7d31334de645
---
modules/lua/libs/equalizer.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/modules/lua/libs/equalizer.c b/modules/lua/libs/equalizer.c
index c4d8d38..b96b863 100644
--- a/modules/lua/libs/equalizer.c
+++ b/modules/lua/libs/equalizer.c
@@ -50,6 +50,9 @@ static int vlclua_preamp_get( lua_State *L )
aout_instance_t *p_aout = input_GetAout( p_input );
float preamp = var_GetFloat( p_aout, "equalizer-preamp");
lua_pushnumber( L, preamp );
+
+ vlc_object_release( p_aout );
+ vlc_object_release( p_input );
return 1;
}
return 0;
@@ -67,6 +70,9 @@ static int vlclua_preamp_set( lua_State *L )
float preamp = luaL_checknumber( L, 1 );
var_SetFloat( p_aout, "equalizer-preamp",preamp);
lua_pushnumber( L, preamp );
+
+ vlc_object_release( p_aout );
+ vlc_object_release( p_input );
return 1;
}
return 0;
More information about the vlc-commits
mailing list