[glib-networking] Don't use the slice allocator
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking] Don't use the slice allocator
- Date: Tue, 4 Dec 2018 15:09:13 +0000 (UTC)
commit 9d4fee3a17b11da928b0c0cae28654c4d3572b73
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Tue Dec 4 09:07:43 2018 -0600
Don't use the slice allocator
The slice allocator has fallen from favor. See:
https://gitlab.gnome.org/GNOME/glib/issues/1079
tls/gnutls/gtlsbackend-gnutls.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tls/gnutls/gtlsbackend-gnutls.c b/tls/gnutls/gtlsbackend-gnutls.c
index a7e9942..c955327 100644
--- a/tls/gnutls/gtlsbackend-gnutls.c
+++ b/tls/gnutls/gtlsbackend-gnutls.c
@@ -207,7 +207,7 @@ cache_data_free (gpointer data)
g_bytes_unref (cache_data->session_id);
g_bytes_unref (cache_data->session_data);
- g_slice_free (GTlsBackendGnutlsCacheData, cache_data);
+ g_free (cache_data);
}
static GHashTable *
@@ -250,7 +250,7 @@ g_tls_backend_gnutls_store_session (unsigned int type,
if (g_hash_table_size (cache) >= SESSION_CACHE_MAX_SIZE)
session_cache_cleanup (cache);
- cache_data = g_slice_new (GTlsBackendGnutlsCacheData);
+ cache_data = g_new (GTlsBackendGnutlsCacheData, 1);
cache_data->session_id = g_bytes_ref (session_id);
cache_data->session_data = g_bytes_ref (session_data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]