diff options
Diffstat (limited to 'src/map.c')
-rw-r--r-- | src/map.c | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -831,3 +831,22 @@ start_map_watch (void) cur = g_list_next (cur); } } + +void +remove_all_maps (void) +{ + GList *cur = maps; + struct rspamd_map *map; + + /* First of all do synced read of data */ + while (cur) { + map = cur->data; + event_del (&map->ev); + cur = g_list_next (cur); + } + g_list_free (maps); + maps = NULL; + memory_pool_delete (map_pool); + map_pool = NULL; +} + |