diff options
Diffstat (limited to 'libs/web/src/template_lualib.c')
-rw-r--r-- | libs/web/src/template_lualib.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libs/web/src/template_lualib.c b/libs/web/src/template_lualib.c index 685613fbdc..f91b19ceb8 100644 --- a/libs/web/src/template_lualib.c +++ b/libs/web/src/template_lualib.c @@ -29,8 +29,13 @@ int template_L_parse(lua_State *L) parser.flags = 0; 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; } |