libs/lmo: fix possible resource leak if lua runs out of memory but file is already...
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 11 Jul 2009 23:07:41 +0000 (23:07 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 11 Jul 2009 23:07:41 +0000 (23:07 +0000)
libs/lmo/src/lmo_lualib.c

index 878ca02..8d869aa 100644 (file)
@@ -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;