Commit f27294c6 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

lua: fix leak

parent be5c27fe
...@@ -354,10 +354,7 @@ static int vlclua_net_poll( lua_State *L ) ...@@ -354,10 +354,7 @@ static int vlclua_net_poll( lua_State *L )
do do
{ {
if( vlc_killed() ) if( vlc_killed() )
{
ret = luaL_error( L, "Interrupted." );
break; break;
}
val = vlc_poll_i11e( p_fds, i_fds, -1 ); val = vlc_poll_i11e( p_fds, i_fds, -1 );
} }
while( val == -1 && errno == EINTR ); while( val == -1 && errno == EINTR );
...@@ -374,6 +371,9 @@ static int vlclua_net_poll( lua_State *L ) ...@@ -374,6 +371,9 @@ static int vlclua_net_poll( lua_State *L )
free( luafds ); free( luafds );
free( p_fds ); free( p_fds );
if( val == -1 )
return luaL_error( L, "Interrupted." );
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment