diff options
Diffstat (limited to 'src/libutil/map.c')
-rw-r--r-- | src/libutil/map.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/libutil/map.c b/src/libutil/map.c index 3794cfcfa..ea295e7a4 100644 --- a/src/libutil/map.c +++ b/src/libutil/map.c @@ -294,8 +294,9 @@ free_http_cbdata_dtor (gpointer p) struct rspamd_map *map; map = cbd->map; + cbd->stage = map_finished; msg_warn_map ("connection with http server is terminated: worker is stopping"); - free_http_cbdata_common (cbd, FALSE); + REF_RELEASE (cbd); } /* @@ -785,6 +786,11 @@ rspamd_map_dns_callback (struct rdns_reply *reply, void *arg) map = cbd->map; + if (cbd->stage == map_finished) { + MAP_RELEASE (cbd, "http_callback_data"); + return; + } + if (reply->code == RDNS_RC_NOERROR) { /* * We just get the first address hoping that a resolver performs @@ -1346,6 +1352,8 @@ rspamd_map_is_map (const gchar *map_line) static void rspamd_map_backend_dtor (struct rspamd_map_backend *bk) { + g_free (bk->uri); + if (bk->protocol == MAP_PROTO_FILE) { if (bk->data.fd) { g_free (bk->data.fd->filename); |