]> git.ipfire.org Git - thirdparty/rspamd.git/commit
Store TLS opts in lua stack, no strdup/free 5626/head
authorJustin Dossey <jbd@justindossey.com>
Thu, 25 Sep 2025 16:52:45 +0000 (09:52 -0700)
committerJustin Dossey <jbd@justindossey.com>
Thu, 25 Sep 2025 16:52:45 +0000 (09:52 -0700)
commit3809ae08b2bfda8f304a33a98e47da3bfe77c202
tree600ca77fa56d6a26a10cb9cf881f3f11ddb6602b
parent7ac9925bc3d3489c6635e272f655cf20b96bcb06
Store TLS opts in lua stack, no strdup/free

- Removed g_strdup/g_free of TLS paths in src/lua/lua_redis.c.
- Now we:
  - Keep TLS values (booleans + strings) on the Lua stack temporarily.
  - Use an absolute table index (so gettable calls aren’t confused by
    the growing stack).
  - Call rspamd_redis_pool_connect_ext while those values are on the
    stack.
  - Pop all postponed values and then the table in one go immediately
    after the connect call.
- The C++ pool still copies into std::string on element creation; we
  only ensure Lua strings live through the call without extra
  allocations.
src/lua/lua_redis.c