From: Vsevolod Stakhov Date: Thu, 16 Feb 2017 13:17:16 +0000 (+0000) Subject: [Fix] Strings returned from lua are ephemeral X-Git-Tag: 1.5.0~95 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fa4fec0db345fe4162ad65a47c234f1171b3ab19;p=rspamd.git [Fix] Strings returned from lua are ephemeral Pointy hat to: @fatalbanana --- 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 {