diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-02-02 01:15:00 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-02-02 11:55:00 -0500 |
commit | 140c5c533338ff4dc2c51ff7ddd90f5f860f88e6 (patch) | |
tree | fea8d67472ce35d3cf70b0dbc214bf2888f36fb6 /gtk/gtkcomposetable.c | |
parent | cebf2b2009a4099166dddd5604e9c9c57af9350f (diff) | |
download | gtk+-140c5c533338ff4dc2c51ff7ddd90f5f860f88e6.tar.gz |
composetable: Don't use GSlice for big blobs
This just doesn't make sense. This will use malloc
anyway, so just call malloc directly.
Diffstat (limited to 'gtk/gtkcomposetable.c')
-rw-r--r-- | gtk/gtkcomposetable.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/gtkcomposetable.c b/gtk/gtkcomposetable.c index add4cf4b66..cfb51e6e81 100644 --- a/gtk/gtkcomposetable.c +++ b/gtk/gtkcomposetable.c @@ -503,11 +503,11 @@ gtk_compose_table_serialize (GtkComposeTable *compose_table, g_return_val_if_fail (index_stride > 0, NULL); length = strlen (header); - total_length = length + sizeof (guint16) * (3 + index_stride * n_seqs); + total_length = length + sizeof (guint16) * (3 + index_stride * n_seqs); if (count) *count = total_length; - p = contents = g_slice_alloc (total_length); + p = contents = g_malloc (total_length); memcpy (p, header, length); p += length; @@ -689,7 +689,7 @@ gtk_compose_table_save_cache (GtkComposeTable *compose_table) } out_save_cache: - g_slice_free1 (length, contents); + g_free (contents); g_free (path); } |