From b2b9cfa6161a98d5d4d074573f99fdac6cb24556 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 28 Oct 2017 15:14:33 +0100 Subject: [Minor] Further portion of g_slice elimination --- src/libmime/email_addr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libmime/email_addr.c') diff --git a/src/libmime/email_addr.c b/src/libmime/email_addr.c index 59e99f531..9e69b68ec 100644 --- a/src/libmime/email_addr.c +++ b/src/libmime/email_addr.c @@ -31,7 +31,7 @@ rspamd_email_addr_dtor (struct rspamd_email_address *addr) g_free ((void *)addr->user); } - g_slice_free1 (sizeof (*addr), addr); + g_free (addr); } static void @@ -74,7 +74,7 @@ rspamd_email_address_from_smtp (const gchar *str, guint len) rspamd_smtp_addr_parse (str, len, &addr); if (addr.flags & RSPAMD_EMAIL_ADDR_VALID) { - ret = g_slice_alloc (sizeof (*ret)); + ret = g_malloc (sizeof (*ret)); memcpy (ret, &addr, sizeof (addr)); if ((ret->flags & RSPAMD_EMAIL_ADDR_QUOTED) && ret->addr[0] == '"') { @@ -123,7 +123,7 @@ rspamd_email_address_add (rspamd_mempool_t *pool, struct rspamd_email_address *elt; guint nlen; - elt = g_slice_alloc0 (sizeof (*elt)); + elt = g_malloc0 (sizeof (*elt)); if (addr != NULL) { memcpy (elt, addr, sizeof (*addr)); -- cgit v1.2.3