diff options
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/addr.c | 16 | ||||
-rw-r--r-- | src/libutil/addr.h | 2 | ||||
-rw-r--r-- | src/libutil/map.c | 6 | ||||
-rw-r--r-- | src/libutil/upstream.c | 4 |
4 files changed, 14 insertions, 14 deletions
diff --git a/src/libutil/addr.c b/src/libutil/addr.c index fb4c537c4..5ef5c9dc0 100644 --- a/src/libutil/addr.c +++ b/src/libutil/addr.c @@ -126,7 +126,7 @@ rspamd_inet_addr_create (gint af) } void -rspamd_inet_address_destroy (rspamd_inet_addr_t *addr) +rspamd_inet_address_free (rspamd_inet_addr_t *addr) { if (addr) { if (addr->af == AF_UNIX) { @@ -293,7 +293,7 @@ rspamd_accept_from_socket (gint sock, rspamd_inet_addr_t **target, } else { /* Avoid leak */ - rspamd_inet_address_destroy (addr); + rspamd_inet_address_free (addr); } return (nfd); @@ -302,7 +302,7 @@ out: serrno = errno; close (nfd); errno = serrno; - rspamd_inet_address_destroy (addr); + rspamd_inet_address_free (addr); return (-1); @@ -390,14 +390,14 @@ rspamd_parse_unix_path (rspamd_inet_addr_t **target, const char *src) *target = addr; } else { - rspamd_inet_address_destroy (addr); + rspamd_inet_address_free (addr); } return TRUE; err: - rspamd_inet_address_destroy (addr); + rspamd_inet_address_free (addr); return FALSE; } @@ -1160,7 +1160,7 @@ rspamd_resolve_addrs (const char *begin, size_t len, GPtrArray **addrs, if (rspamd_parse_inet_address (&cur_addr, begin, len)) { if (*addrs == NULL) { *addrs = g_ptr_array_new_full (1, - (GDestroyNotify)rspamd_inet_address_destroy); + (GDestroyNotify) rspamd_inet_address_free); if (pool != NULL) { rspamd_mempool_add_destructor (pool, @@ -1206,7 +1206,7 @@ rspamd_resolve_addrs (const char *begin, size_t len, GPtrArray **addrs, if (*addrs == NULL) { *addrs = g_ptr_array_new_full (addr_cnt, - (GDestroyNotify)rspamd_inet_address_destroy); + (GDestroyNotify) rspamd_inet_address_free); if (pool != NULL) { rspamd_mempool_add_destructor (pool, @@ -1310,7 +1310,7 @@ rspamd_parse_host_port_priority (const gchar *str, /* Special case of unix socket, as getaddrinfo cannot deal with them */ if (*addrs == NULL) { *addrs = g_ptr_array_new_full (1, - (GDestroyNotify)rspamd_inet_address_destroy); + (GDestroyNotify) rspamd_inet_address_free); if (pool != NULL) { rspamd_mempool_add_destructor (pool, diff --git a/src/libutil/addr.h b/src/libutil/addr.h index a50786adc..9b0921747 100644 --- a/src/libutil/addr.h +++ b/src/libutil/addr.h @@ -227,7 +227,7 @@ gboolean rspamd_parse_host_port_priority (const gchar *str, * Destroy the specified IP address * @param addr */ -void rspamd_inet_address_destroy (rspamd_inet_addr_t *addr); +void rspamd_inet_address_free (rspamd_inet_addr_t *addr); /** * Apply the specified mask to an address (ignored for AF_UNIX) diff --git a/src/libutil/map.c b/src/libutil/map.c index 3c8db183b..30617689c 100644 --- a/src/libutil/map.c +++ b/src/libutil/map.c @@ -268,7 +268,7 @@ free_http_cbdata_common (struct http_callback_data *cbd, gboolean plan_new) } if (cbd->addr) { - rspamd_inet_address_destroy (cbd->addr); + rspamd_inet_address_free (cbd->addr); } @@ -910,7 +910,7 @@ rspamd_map_dns_callback (struct rdns_reply *reply, void *arg) write_http_request (cbd); } else { - rspamd_inet_address_destroy (cbd->addr); + rspamd_inet_address_free (cbd->addr); cbd->addr = NULL; } } @@ -1094,7 +1094,7 @@ rspamd_map_common_http_callback (struct rspamd_map *map, struct rspamd_map_backe else { msg_warn_map ("cannot load map: cannot connect to %s: %s", data->host, strerror (errno)); - rspamd_inet_address_destroy (cbd->addr); + rspamd_inet_address_free (cbd->addr); cbd->addr = NULL; MAP_RELEASE (cbd, "http_callback_data"); } diff --git a/src/libutil/upstream.c b/src/libutil/upstream.c index 67debb017..529d3fcf0 100644 --- a/src/libutil/upstream.c +++ b/src/libutil/upstream.c @@ -226,7 +226,7 @@ rspamd_upstream_addr_elt_dtor (gpointer a) { struct upstream_addr_elt *elt = a; - rspamd_inet_address_destroy (elt->addr); + rspamd_inet_address_free (elt->addr); g_slice_free1 (sizeof (*elt), elt); } @@ -497,7 +497,7 @@ rspamd_upstream_dtor (struct upstream *up) if (up->new_addrs) { LL_FOREACH_SAFE(up->new_addrs, cur, tmp) { /* Here we need to free pointer as well */ - rspamd_inet_address_destroy (cur->addr); + rspamd_inet_address_free (cur->addr); g_free (cur); } } |