auto close the handle after loaded the buffer

This commit is contained in:
Lion 2022-07-20 16:06:37 +08:00
parent 4ba77bca34
commit 408cb21f3b
1 changed files with 1 additions and 0 deletions

View File

@ -265,6 +265,7 @@ function _M.load_content(dbPath)
local c = handle:read("*a") local c = handle:read("*a")
if c == nil then if c == nil then
handle:close()
return nil, string.format("failed to read xdb content") return nil, string.format("failed to read xdb content")
end end