From: Vsevolod Stakhov Date: Wed, 28 Jan 2015 16:21:40 +0000 (+0000) Subject: Use g_malloc for convinience. X-Git-Tag: 0.9.0~817^2~12 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=918e002379b0ef95e10c6608c6e23d89d284a71b;p=rspamd.git Use g_malloc for convinience. --- 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; }