[vlc-commits] lua: fix leak
Rémi Denis-Courmont
git at videolan.org
Sat Jan 2 17:49:28 CET 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jan 2 18:49:16 2016 +0200| [f27294c6684edbfc08a7a3028d0692f19f09e140] | committer: Rémi Denis-Courmont
lua: fix leak
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f27294c6684edbfc08a7a3028d0692f19f09e140
---
modules/lua/libs/net.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/lua/libs/net.c b/modules/lua/libs/net.c
index 3d8fb51..071bd29 100644
--- a/modules/lua/libs/net.c
+++ b/modules/lua/libs/net.c
@@ -354,10 +354,7 @@ static int vlclua_net_poll( lua_State *L )
do
{
if( vlc_killed() )
- {
- ret = luaL_error( L, "Interrupted." );
break;
- }
val = vlc_poll_i11e( p_fds, i_fds, -1 );
}
while( val == -1 && errno == EINTR );
@@ -374,6 +371,9 @@ static int vlclua_net_poll( lua_State *L )
free( luafds );
free( p_fds );
+
+ if( val == -1 )
+ return luaL_error( L, "Interrupted." );
return ret;
}
More information about the vlc-commits
mailing list