summaryrefslogtreecommitdiff
path: root/multiload
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-06-25 11:46:20 +0200
committerStefano Karapetsas <[email protected]>2014-06-25 11:46:20 +0200
commit739798f436d6c1de93179a98b70962748dde9ca9 (patch)
treea15a9fc08b795075532faead8a8135a02fe718a0 /multiload
parent9bf73874d45075aad80303e9c0ee96cdc9f3c450 (diff)
downloadmate-applets-739798f436d6c1de93179a98b70962748dde9ca9.tar.bz2
mate-applets-739798f436d6c1de93179a98b70962748dde9ca9.tar.xz
multiload: Fix cairo memory leaks
Diffstat (limited to 'multiload')
-rw-r--r--multiload/load-graph.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/multiload/load-graph.c b/multiload/load-graph.c
index da40c8a9..a6508056 100644
--- a/multiload/load-graph.c
+++ b/multiload/load-graph.c
@@ -87,6 +87,8 @@ load_graph_draw (LoadGraph *g)
}
gtk_widget_queue_draw (g->disp);
+
+ cairo_destroy (cr);
}
/* Updates the load graph when the timeout expires */
@@ -205,6 +207,10 @@ load_graph_expose (GtkWidget *widget,
cairo_set_source_surface (cr, g->surface, 0, 0);
cairo_paint (cr);
+#if !GTK_CHECK_VERSION (3, 0, 0)
+ cairo_destroy (cr);
+#endif
+
return FALSE;
}