summaryrefslogtreecommitdiff
path: root/src/app.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2007-12-18 17:09:07 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2007-12-18 17:09:07 +0000
commit5c0c176c68a3bb677af9b7ac6b50dc89013e639b (patch)
tree41f191309b0c965caa79ffe8d0fb524a70d28d60 /src/app.c
parente9b0a6908704ae5705ada7d3a09bd5cc293da65f (diff)
Fix memleak.
Diffstat (limited to 'src/app.c')
-rw-r--r--src/app.c10
1 files changed, 6 insertions, 4 deletions
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);
}