forked from AuroraMiddleware/gtk
testsuite: Assorted leak fixes
All found by asan.
This commit is contained in:
parent
26a23d3e56
commit
0dc946da63
@ -5971,6 +5971,7 @@ specific_bug_346800 (void)
|
||||
columns[1] = G_TYPE_BOOLEAN;
|
||||
store = gtk_tree_store_newv (2, columns);
|
||||
model = GTK_TREE_MODEL (store);
|
||||
GList *junk = NULL;
|
||||
|
||||
/*http://bugzilla.gnome.org/show_bug.cgi?id=346800 */
|
||||
|
||||
@ -5981,14 +5982,14 @@ specific_bug_346800 (void)
|
||||
{
|
||||
/* allocate random amounts of junk, otherwise the filter model's arrays can expand without moving */
|
||||
|
||||
g_malloc (138);
|
||||
junk = g_list_append (junk, g_malloc (138));
|
||||
gtk_tree_store_append (store, &node_iters[i], NULL);
|
||||
gtk_tree_store_set (store, &node_iters[i],
|
||||
0, "something",
|
||||
1, ((i%6) == 0) ? FALSE : TRUE,
|
||||
-1);
|
||||
|
||||
g_malloc (47);
|
||||
junk = g_list_append (junk, g_malloc (47));
|
||||
gtk_tree_store_append (store, &child_iters[i], &node_iters[i]);
|
||||
gtk_tree_store_set (store, &child_iters[i],
|
||||
0, "something else",
|
||||
@ -6007,6 +6008,8 @@ specific_bug_346800 (void)
|
||||
gtk_tree_model_filter_refilter (filter);
|
||||
}
|
||||
}
|
||||
|
||||
g_list_free_full (junk, g_free);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -354,6 +354,8 @@ test_trigger_trigger (void)
|
||||
}
|
||||
|
||||
gdk_event_unref (event);
|
||||
|
||||
g_free (keys);
|
||||
}
|
||||
|
||||
gdk_surface_destroy (surface);
|
||||
|
@ -304,6 +304,7 @@ main (int argc, char **argv)
|
||||
g_error ("Option parsing failed: %s\n", error->message);
|
||||
return 1;
|
||||
}
|
||||
g_option_context_free (context);
|
||||
|
||||
gtk_init ();
|
||||
|
||||
|
@ -1360,6 +1360,7 @@ check_buffer_contents (GtkTextBuffer *buffer,
|
||||
gtk_text_buffer_get_end_iter (buffer, &end);
|
||||
buffer_contents = gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
|
||||
g_assert_cmpstr (buffer_contents, ==, contents);
|
||||
g_free (buffer_contents);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -78,6 +78,7 @@ parse_command_line (int *argc, char ***argv)
|
||||
g_print ("option parsing failed: %s\n", error->message);
|
||||
return FALSE;
|
||||
}
|
||||
g_option_context_free (context);
|
||||
|
||||
for (i = 0; i < *argc; i++)
|
||||
{
|
||||
@ -325,6 +326,8 @@ test_ui_file (GFile *file)
|
||||
}
|
||||
|
||||
remove_extra_css (provider);
|
||||
|
||||
g_free (ui_file);
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
Reference in New Issue
Block a user