aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-11-23 17:49:57 +0100
committerKim Alvefur <zash@zash.se>2023-11-23 17:49:57 +0100
commit58988fbce5ff31a8e1c6d98d0e51e2757fe3add0 (patch)
tree9b397893a8e4b755d558d88ac9edb5b24299a585
parent37ba63f50be069885da0714267223f10535c55b8 (diff)
downloadprosody-58988fbce5ff31a8e1c6d98d0e51e2757fe3add0.tar.gz
prosody-58988fbce5ff31a8e1c6d98d0e51e2757fe3add0.zip
mod_storage_internal: Close archive list after completion of iteration
This closes the two FDs that the random access list abstraction uses, otherwise they are left to the garbage collector.
-rw-r--r--plugins/mod_storage_internal.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/mod_storage_internal.lua b/plugins/mod_storage_internal.lua
index da562201..26dd6a0e 100644
--- a/plugins/mod_storage_internal.lua
+++ b/plugins/mod_storage_internal.lua
@@ -258,6 +258,7 @@ function archive:find(username, query)
return function()
local item = iter();
if item == nil then
+ list:close();
return
end
local key = item.key;