From 7ac3bac56921c889d29636b0e957324553457e88 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 11 Jul 2009 23:07:41 +0000 Subject: libs/lmo: fix possible resource leak if lua runs out of memory but file is already opened --- libs/lmo/src/lmo_lualib.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libs/lmo/src/lmo_lualib.c') diff --git a/libs/lmo/src/lmo_lualib.c b/libs/lmo/src/lmo_lualib.c index 878ca02b27..8d869aa49c 100644 --- a/libs/lmo/src/lmo_lualib.c +++ b/libs/lmo/src/lmo_lualib.c @@ -35,6 +35,7 @@ static int lmo_L_open(lua_State *L) { return 1; } + lmo_close(ar); lua_pushnil(L); lua_pushstring(L, "out of memory"); return 2; -- cgit v1.2.3