From e9bff5301559fff01af31132f7d7696e47b930ce Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 24 Jul 2020 19:22:12 -0400 Subject: [PATCH] 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. --- gtk/gtktimsort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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