diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-01-28 16:21:40 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-01-28 16:21:40 +0000 |
commit | 918e002379b0ef95e10c6608c6e23d89d284a71b (patch) | |
tree | 709057441f46d435ceb881d9aabc79e446eaaa1e | |
parent | 976633feae742845a47aabe70dd93c547ba1876b (diff) | |
download | rspamd-918e002379b0ef95e10c6608c6e23d89d284a71b.tar.gz rspamd-918e002379b0ef95e10c6608c6e23d89d284a71b.zip |
Use g_malloc for convinience.
-rw-r--r-- | src/libutil/util.c | 4 |
1 files 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; } |