diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2022-03-20 12:45:03 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2022-03-20 12:45:03 +0000 |
commit | 9117058f1548c521567e5314280bd484ba039263 (patch) | |
tree | 5256e85f8f11cfca28d7d961609a52fe1e829078 /src/fuzzy_storage.c | |
parent | 920edd39c12de0e69e54aa0bcde81e6e8d814c22 (diff) | |
download | rspamd-9117058f1548c521567e5314280bd484ba039263.tar.gz rspamd-9117058f1548c521567e5314280bd484ba039263.zip |
[Minor] Allow to specify mempool when copying an IP address structure
Diffstat (limited to 'src/fuzzy_storage.c')
-rw-r--r-- | src/fuzzy_storage.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c index b9397fc2e..3ed30b179 100644 --- a/src/fuzzy_storage.c +++ b/src/fuzzy_storage.c @@ -262,7 +262,7 @@ rspamd_fuzzy_check_ratelimit (struct fuzzy_session *session) } */ - masked = rspamd_inet_address_copy (session->addr); + masked = rspamd_inet_address_copy(session->addr, NULL); if (rspamd_inet_address_get_af (masked) == AF_INET) { rspamd_inet_address_apply_mask (masked, @@ -1098,7 +1098,7 @@ rspamd_fuzzy_process_command (struct fuzzy_session *session) session->addr, -1); if (ip_stat == NULL) { - naddr = rspamd_inet_address_copy (session->addr); + naddr = rspamd_inet_address_copy(session->addr, NULL); ip_stat = g_malloc0 (sizeof (*ip_stat)); REF_INIT_RETAIN (ip_stat, fuzzy_key_stat_dtor); rspamd_lru_hash_insert (session->key_stat->last_ips, @@ -1662,7 +1662,7 @@ accept_fuzzy_socket (EV_P_ ev_io *w, int revents) nerrors = g_malloc (sizeof (*nerrors)); *nerrors = 1; rspamd_lru_hash_insert (session->ctx->errors_ips, - rspamd_inet_address_copy (session->addr), + rspamd_inet_address_copy(session->addr, NULL), nerrors, -1, -1); } else { |