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 878ca02b2700d671f0cbd9a0a701033b963da05f..8d869aa49cb42260616ed9cb3d03647c3f48ca88 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;