summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--contrib/lc-btrie/btrie.c5
-rw-r--r--src/lua/lua_redis.c1
2 files changed, 4 insertions, 2 deletions
diff --git a/contrib/lc-btrie/btrie.c b/contrib/lc-btrie/btrie.c
index d95bf0676..51357a1d6 100644
--- a/contrib/lc-btrie/btrie.c
+++ b/contrib/lc-btrie/btrie.c
@@ -1380,9 +1380,10 @@ btrie_init(rspamd_mempool_t *mp)
{
struct btrie *btrie;
- if (!(btrie = rspamd_mempool_alloc (mp, sizeof(*btrie))))
+ if (!(btrie = rspamd_mempool_alloc0 (mp, sizeof(*btrie)))) {
return NULL;
- memset(btrie, 0, sizeof(*btrie));
+ }
+
btrie->mp = mp;
btrie->alloc_total = sizeof(*btrie);
diff --git a/src/lua/lua_redis.c b/src/lua/lua_redis.c
index 402190351..455afd9b6 100644
--- a/src/lua/lua_redis.c
+++ b/src/lua/lua_redis.c
@@ -219,6 +219,7 @@ lua_redis_fin (void *arg)
event_del (&sp_ud->timeout);
msg_debug ("finished redis query %p from session %p", sp_ud, ctx);
sp_ud->replied = TRUE;
+ sp_ud->c->terminated = TRUE;
REDIS_RELEASE (ctx);
}