libs/web: fix file handle leak in template parser
This commit is contained in:
parent
1b557b0b7b
commit
047d4e45f6
1 changed files with 7 additions and 2 deletions
|
@ -30,7 +30,12 @@ int template_L_parse(lua_State *L)
|
|||
parser.bufsize = 0;
|
||||
parser.state = T_STATE_TEXT_NEXT;
|
||||
|
||||
if( !(lua_status = lua_load(L, template_reader, &parser, file)) )
|
||||
lua_status = lua_load(L, template_reader, &parser, file);
|
||||
|
||||
(void) close(parser.fd);
|
||||
|
||||
|
||||
if( lua_status == 0 )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue