]> source.dussan.org Git - rspamd.git/commitdiff
Use g_malloc for convinience.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 28 Jan 2015 16:21:40 +0000 (16:21 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 28 Jan 2015 16:21:40 +0000 (16:21 +0000)
src/libutil/util.c

index ccec534eb78d4545d9710ccfb64bb8c4e02da47b..ada373eb1a857e16f659c8b484caff91b0338187 100644 (file)
@@ -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;
                }