diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-01-24 15:02:30 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-01-24 15:02:30 +0000 |
commit | 609e3d1f83548b47a8a3cc4a8cd1e6c2fbd996fe (patch) | |
tree | d9dadac45680ce15af0a4a0ec5cb8e8357acf392 /src/lua/lua_task.c | |
parent | 917bbfd3a390bcb1142b41216d540313c8c5d2bd (diff) | |
download | rspamd-609e3d1f83548b47a8a3cc4a8cd1e6c2fbd996fe.tar.gz rspamd-609e3d1f83548b47a8a3cc4a8cd1e6c2fbd996fe.zip |
[Minor] Fix misplaced code
Diffstat (limited to 'src/lua/lua_task.c')
-rw-r--r-- | src/lua/lua_task.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c index f8c624e60..7b21ccc0d 100644 --- a/src/lua/lua_task.c +++ b/src/lua/lua_task.c @@ -1389,15 +1389,15 @@ lua_task_load_from_file (lua_State * L) else { g_string_append_len (data, buf, r); } - - task = rspamd_task_new (NULL, cfg, NULL, NULL, NULL); - task->msg.begin = data->str; - task->msg.len = data->len; - rspamd_mempool_add_destructor (task->task_pool, - lua_task_free_dtor, task); - res = TRUE; - g_string_free (data, FALSE); /* Buffer is still valid */ } + + task = rspamd_task_new (NULL, cfg, NULL, NULL, NULL); + task->msg.begin = data->str; + task->msg.len = data->len; + rspamd_mempool_add_destructor (task->task_pool, + lua_task_free_dtor, task); + res = TRUE; + g_string_free (data, FALSE); /* Buffer is still valid */ } else { map = rspamd_file_xmap (fname, PROT_READ, &sz, TRUE); |