summaryrefslogtreecommitdiffhomepage
path: root/libs/lmo
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-07-11 23:07:41 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-07-11 23:07:41 +0000
commit7ac3bac56921c889d29636b0e957324553457e88 (patch)
treeaa943e9e28f031406bf1ab78c9fbe4a313a9c43a /libs/lmo
parenta531bb7bea02dcaae9293ea5b6fcf3b675f29aac (diff)
libs/lmo: fix possible resource leak if lua runs out of memory but file is already opened
Diffstat (limited to 'libs/lmo')
-rw-r--r--libs/lmo/src/lmo_lualib.c1
1 files changed, 1 insertions, 0 deletions
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;