commit df9ee0b: [Minor] Do not unref what's not been refed
Vsevolod Stakhov
vsevolod at highsecure.ru
Mon Sep 13 15:35:04 UTC 2021
Author: Vsevolod Stakhov
Date: 2021-09-13 16:28:09 +0100
URL: https://github.com/rspamd/rspamd/commit/df9ee0b1caf1f5617fbf90cf1e4ff155757b5866 (HEAD -> master)
[Minor] Do not unref what's not been refed
---
src/libserver/fuzzy_backend/fuzzy_backend_redis.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libserver/fuzzy_backend/fuzzy_backend_redis.c b/src/libserver/fuzzy_backend/fuzzy_backend_redis.c
index 0de487534..18e049926 100644
--- a/src/libserver/fuzzy_backend/fuzzy_backend_redis.c
+++ b/src/libserver/fuzzy_backend/fuzzy_backend_redis.c
@@ -172,7 +172,7 @@ rspamd_fuzzy_backend_redis_dtor (struct rspamd_fuzzy_backend_redis *backend)
{
lua_State *L = backend->L;
- if (backend->conf_ref) {
+ if (backend->conf_ref != -1) {
luaL_unref (L, LUA_REGISTRYINDEX, backend->conf_ref);
}
More information about the Commits
mailing list