diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-01-16 19:05:18 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-01-16 19:05:18 +0000 |
commit | deabe33977c46ef2e0d8b920f90c5c6a854741bd (patch) | |
tree | 75157a54fec58c6b6d8eea9865bf0f0866aa764f /src/libutil/upstream.c | |
parent | a95b7ba1758c89e5702d0381bf51fbfdbc70373a (diff) | |
download | rspamd-deabe33977c46ef2e0d8b920f90c5c6a854741bd.tar.gz rspamd-deabe33977c46ef2e0d8b920f90c5c6a854741bd.zip |
[Fix] Fix upstream addrs updating
Diffstat (limited to 'src/libutil/upstream.c')
-rw-r--r-- | src/libutil/upstream.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libutil/upstream.c b/src/libutil/upstream.c index 71b8de877..37efdabd0 100644 --- a/src/libutil/upstream.c +++ b/src/libutil/upstream.c @@ -273,7 +273,7 @@ rspamd_upstream_update_addrs (struct upstream *up) PTR_ARRAY_FOREACH (up->addrs.addr, i, addr_elt) { if (rspamd_inet_address_compare (addr_elt->addr, cur->addr) == 0) { - naddr = g_malloc0 (sizeof (*addr_elt)); + naddr = g_malloc0 (sizeof (*naddr)); naddr->addr = cur->addr; naddr->errors = reset_errors ? 0 : addr_elt->errors; seen_addr = TRUE; @@ -283,9 +283,9 @@ rspamd_upstream_update_addrs (struct upstream *up) } if (!seen_addr) { - addr_elt = g_malloc0 (sizeof (*addr_elt)); - addr_elt->addr = cur->addr; - addr_elt->errors = 0; + naddr = g_malloc0 (sizeof (*naddr)); + naddr->addr = cur->addr; + naddr->errors = 0; } g_ptr_array_add (new_addrs, naddr); |