]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Allow tasks to have empty re cache
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 16 Jun 2018 12:51:41 +0000 (13:51 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 16 Jun 2018 12:51:41 +0000 (13:51 +0100)
src/libserver/task.c

index 9be780b1b44a1ec474dd3a9d7076e20f10aada99..9801212f1772efaab1ce00d9feffa0239b791fe7 100644 (file)
@@ -263,7 +263,10 @@ rspamd_task_free (struct rspamd_task *task)
                }
 
                ucl_object_unref (task->messages);
-               rspamd_re_cache_runtime_destroy (task->re_rt);
+
+               if (task->re_rt) {
+                       rspamd_re_cache_runtime_destroy (task->re_rt);
+               }
 
                if (task->http_conn != NULL) {
                        rspamd_http_connection_reset (task->http_conn);