X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=libs%2Fweb%2Fsrc%2Ftemplate_lualib.c;h=f91b19ceb85c07f1778771cc29d72b1adfa94feb;hp=685613fbdcccad36dd9afd1c0964ac74d566464a;hb=047d4e45f6d26d54d2019ff3d12e372fae3f2e22;hpb=80a2dd2cc27e2fc0c55f03f01a1d460a91954ab6 diff --git a/libs/web/src/template_lualib.c b/libs/web/src/template_lualib.c index 685613fbd..f91b19ceb 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; }