From: Aki Tuomi Date: Tue, 23 Mar 2021 07:02:06 +0000 (+0200) Subject: lib-dict: dict-lua - Do not free pool after iteration finishes X-Git-Tag: 2.3.15~138 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b72e08e51958bc634fe3998873907ebd97cebc1e;p=thirdparty%2Fdovecot%2Fcore.git lib-dict: dict-lua - Do not free pool after iteration finishes Otherwise we get double-free from gc. Broken in 1e67b93cc9f469bb144fc890a6cb9b9b9cd20811 --- diff --git a/src/lib-dict/dict-iter-lua.c b/src/lib-dict/dict-iter-lua.c index ee6b3a98bd..14a505ce0e 100644 --- a/src/lib-dict/dict-iter-lua.c +++ b/src/lib-dict/dict-iter-lua.c @@ -72,9 +72,6 @@ static int lua_dict_iterate_step(lua_State *L) i_assert(nrefs % 2 == 0); if (nrefs == 0) { - /* iteration is over - clean up */ - pool_unref(&iter->pool); - if (iter->error_ref != 0) { /* dict iteration generated an error - raise it now */ lua_rawgeti(L, LUA_REGISTRYINDEX, iter->error_ref);