libs/lmo: fix possible resource leak if lua runs out of memory but file is already...
[project/luci.git] / 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;
                }
 
                        return 1;
                }
 
+               lmo_close(ar);
                lua_pushnil(L);
                lua_pushstring(L, "out of memory");
                return 2;
                lua_pushnil(L);
                lua_pushstring(L, "out of memory");
                return 2;