testtreeview: Fix 19 year old use-after-free

This commit is contained in:
Benjamin Otte 2020-03-06 05:01:01 +01:00
parent 03e7c7fab1
commit 3b8d9dbd28

View File

@ -1019,8 +1019,8 @@ gtk_real_model_types_iter_next (GtkTreeModel *tree_model,
if (children[i] != G_TYPE_INVALID) if (children[i] != G_TYPE_INVALID)
{ {
g_free (children);
iter->user_data = GINT_TO_POINTER (children[i]); iter->user_data = GINT_TO_POINTER (children[i]);
g_free (children);
return TRUE; return TRUE;
} }
else else