diff options
author | Niels De Graef <nielsdegraef@gmail.com> | 2023-01-16 19:15:20 +0100 |
---|---|---|
committer | Niels De Graef <nielsdegraef@gmail.com> | 2023-01-16 19:17:59 +0100 |
commit | 0f04e5d371b8060801656715ea659e44fd8ebe9c (patch) | |
tree | 9b3bf76e2f4b6360b3207492557763409036db70 /libsecret/secret-item.c | |
parent | 33a4de59a2a3357cea5bd339489340a9c615024d (diff) | |
download | libsecret-0f04e5d371b8060801656715ea659e44fd8ebe9c.tar.gz |
Stop using GSlice
GLib is discussing deprecating/removing it upstream [1] since it has
only limited uses. Next to that, it seems to bork stack traces here when
using ASAN (for which you also have to specify `G_SLICE=always-malloc`
and some other envvars too).
In other words, let's just get rid of using `GSlice` and call the
allocation APIs directly.
[1]: https://gitlab.gnome.org/GNOME/glib/-/issues/1079
Diffstat (limited to 'libsecret/secret-item.c')
-rw-r--r-- | libsecret/secret-item.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libsecret/secret-item.c b/libsecret/secret-item.c index 6703b20..21b8ecb 100644 --- a/libsecret/secret-item.c +++ b/libsecret/secret-item.c @@ -1341,7 +1341,7 @@ loads_closure_free (gpointer data) if (loads->service) g_object_unref (loads->service); g_hash_table_destroy (loads->items); - g_slice_free (LoadsClosure, loads); + g_free (loads); } static void @@ -1443,7 +1443,7 @@ secret_item_load_secrets (GList *items, task = g_task_new (NULL, cancellable, callback, user_data); g_task_set_source_tag (task, secret_item_load_secrets); - loads = g_slice_new0 (LoadsClosure); + loads = g_new0 (LoadsClosure, 1); loads->items = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref); |