From 918e002379b0ef95e10c6608c6e23d89d284a71b Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 28 Jan 2015 16:21:40 +0000 Subject: [PATCH] Use g_malloc for convinience. --- src/libutil/util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libutil/util.c b/src/libutil/util.c index ccec534eb..ada373eb1 100644 --- a/src/libutil/util.c +++ b/src/libutil/util.c @@ -2161,7 +2161,7 @@ rspamd_decode_base32 (gchar *in, gsize inlen, gsize *outlen) guint processed_bits = 0; gsize olen = 0, i, allocated_len = inlen * 8 / 5 + 1; - res = g_slice_alloc (allocated_len); + res = g_malloc (allocated_len); for (i = 0; i < inlen; i ++) { c = (guchar)in[i]; @@ -2174,7 +2174,7 @@ rspamd_decode_base32 (gchar *in, gsize inlen, gsize *outlen) decoded = b32_dec[c]; if (decoded == 0xff) { - g_slice_free1 (allocated_len, res); + g_free (res); return NULL; } -- 2.39.5