From fa4fec0db345fe4162ad65a47c234f1171b3ab19 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 16 Feb 2017 13:17:16 +0000 Subject: [PATCH] [Fix] Strings returned from lua are ephemeral Pointy hat to: @fatalbanana --- src/lua/lua_task.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c index af85282f2..17f55b8b2 100644 --- a/src/lua/lua_task.c +++ b/src/lua/lua_task.c @@ -3425,7 +3425,7 @@ lua_task_set_metric_subject (lua_State *L) subject = luaL_checkstring (L, 2); if (task && metric && subject) { - metric->subject = subject; + metric->subject = rspamd_mempool_strdup (task->task_pool, subject); lua_pushboolean (L, true); } else { -- 2.39.5