summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-07-24 19:22:12 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-07-24 19:23:18 -0400
commite9bff5301559fff01af31132f7d7696e47b930ce (patch)
treecd81c9ff97e62aea2170be3e0b4512da538790ac
parent2a43ce17057638667ffefb4909632100149a71d8 (diff)
downloadgtk+-e9bff5301559fff01af31132f7d7696e47b930ce.tar.gz
timsort: Avoid a crash
We need to clear the pointer after freeing the data, since the sortlistmodel keeps its timsort structure around and reuses it.
-rw-r--r--gtk/gtktimsort.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtktimsort.c b/gtk/gtktimsort.c
index f3595b01bc..7aadef0dda 100644
--- a/gtk/gtktimsort.c
+++ b/gtk/gtktimsort.c
@@ -85,7 +85,7 @@ gtk_tim_sort_init (GtkTimSort *self,
void
gtk_tim_sort_finish (GtkTimSort *self)
{
- g_free (self->tmp);
+ g_clear_pointer (&self->tmp, g_free);
}
void