From 5c0c176c68a3bb677af9b7ac6b50dc89013e639b Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 18 Dec 2007 17:09:07 +0000 Subject: Fix memleak. --- src/app.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/app.c') diff --git a/src/app.c b/src/app.c index f4c0d2f..bbb3134 100644 --- a/src/app.c +++ b/src/app.c @@ -1115,8 +1115,9 @@ vg_events_server_cb (GIOChannel *source, } if (! app->client.terminated) { - gtk_tree_view_set_model (ensure_procmap (app), - procmap_store_new (app->client.pid)); + GtkTreeModel *model = procmap_store_new (app->client.pid); + gtk_tree_view_set_model (ensure_procmap (app), model); + g_object_unref (model); } gdk_window_set_cursor (app->window->window, NULL); @@ -1755,8 +1756,9 @@ lwp_events_server_cb (GIOChannel *source, gzclose (file); if (! app->client.terminated) { - gtk_tree_view_set_model (ensure_procmap (app), - procmap_store_new (app->client.pid)); + GtkTreeModel *model = procmap_store_new (app->client.pid); + gtk_tree_view_set_model (ensure_procmap (app), model); + g_object_unref (model); } else { call_graph_store_update_tree_model (app->client.call_graph); } -- cgit v1.2.3