diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-10-28 15:14:33 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-10-28 15:14:33 +0100 |
commit | b2b9cfa6161a98d5d4d074573f99fdac6cb24556 (patch) | |
tree | 7d531529f1798da141faeb17b0df1b47fc08896a /src/libutil/addr.c | |
parent | 4656f5525d110e3951672ad66a29cfb395f7d32f (diff) | |
download | rspamd-b2b9cfa6161a98d5d4d074573f99fdac6cb24556.tar.gz rspamd-b2b9cfa6161a98d5d4d074573f99fdac6cb24556.zip |
[Minor] Further portion of g_slice elimination
Diffstat (limited to 'src/libutil/addr.c')
-rw-r--r-- | src/libutil/addr.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libutil/addr.c b/src/libutil/addr.c index b4ee003ba..765046dec 100644 --- a/src/libutil/addr.c +++ b/src/libutil/addr.c @@ -109,10 +109,10 @@ rspamd_inet_addr_create (gint af) { rspamd_inet_addr_t *addr; - addr = g_slice_alloc0 (sizeof (rspamd_inet_addr_t)); + addr = g_malloc0 (sizeof (rspamd_inet_addr_t)); if (af == AF_UNIX) { - addr->u.un = g_slice_alloc0 (sizeof (*addr->u.un)); + addr->u.un = g_malloc0 (sizeof (*addr->u.un)); addr->slen = sizeof (addr->u.un->addr); } @@ -129,10 +129,10 @@ rspamd_inet_address_free (rspamd_inet_addr_t *addr) if (addr) { if (addr->af == AF_UNIX) { if (addr->u.un) { - g_slice_free1 (sizeof (*addr->u.un), addr->u.un); + g_free (addr->u.un); } } - g_slice_free1 (sizeof (rspamd_inet_addr_t), addr); + g_free (addr); } } @@ -1096,7 +1096,7 @@ rspamd_inet_address_recvfrom (gint fd, void *buf, gsize len, gint fl, addr->slen = slen; if (addr->af == AF_UNIX) { - addr->u.un = g_slice_alloc (sizeof (*addr->u.un)); + addr->u.un = g_malloc (sizeof (*addr->u.un)); memcpy (&addr->u.un->addr, &su.su, sizeof (struct sockaddr_un)); } else { |