]> git.cworth.org Git - acre/commitdiff
Close up some memory leaks.
authorCarl Worth <cworth@cworth.org>
Thu, 7 Nov 2013 17:25:46 +0000 (09:25 -0800)
committerCarl Worth <cworth@cworth.org>
Thu, 7 Nov 2013 17:25:46 +0000 (09:25 -0800)
Thanks to valgrind for catching these, of course.

acre.c

diff --git a/acre.c b/acre.c
index aeec575ef9a450378024543b422167a2e92ec521..5ac51bfae1c7f34c148d64013065d5b7c874cae8 100644 (file)
--- a/acre.c
+++ b/acre.c
@@ -436,6 +436,7 @@ _draw_title_and_labels (acre_t *acre)
 
     title_layout = _create_layout (acre, acre->title);
     pango_layout_set_font_description (title_layout, title_font);
+    pango_font_description_free (title_font);
 
     x_axis_layout = _create_layout (acre, acre->x_axis.label);
     y_axis_layout = _create_layout (acre, acre->y_axis.label);
@@ -1053,6 +1054,8 @@ acre_data_create (void)
 void
 acre_data_destroy (acre_data_t *data)
 {
+    free (data->name);
+
     free (data->points);
 
     free (data);