[goffice] Fixed memory leaks found by cppcheck analysis.
- From: Jean Bréfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Fixed memory leaks found by cppcheck analysis.
- Date: Fri, 17 Dec 2010 15:04:54 +0000 (UTC)
commit a2b13cedd098b260703a9627e85c8c95a9773aed
Author: Jean Brefort <jean brefort normalesup org>
Date: Fri Dec 17 16:03:06 2010 +0100
Fixed memory leaks found by cppcheck analysis.
ChangeLog | 7 +++++++
NEWS | 3 +++
goffice/graph/gog-axis-line.c | 1 +
plugins/plot_surface/gog-contour.c | 1 +
tests/go-demo.c | 5 ++++-
tests/shapes-demo.c | 1 +
6 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 81155ef..58315c1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-12-17 Jean Brefort <jean brefort normalesup org>
+
+ * goffice/graph/gog-axis-line.c (xyz_process): fixed a memory leak.
+ * plugins/plot_surface/gog-contour.c (gog_contour_view_render): ditto.
+ * tests/go-demo.c (insert_histogram_data), (main): ditto.
+ * tests/shapes-demo.c (open_file): ditto.
+
2010-11-30 Andreas J. Guelzow <aguelzow pyrshep ca>
* goffice/utils/go-format.c (go_format_output_text_to_odf): new
diff --git a/NEWS b/NEWS
index f3dff58..190ced0 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,9 @@ goffice 0.8.13:
Andreas
* Write text formats to ODF. [#636158]
+Jean:
+ * Fixed memory leaks found by cppcheck analysis.
+
--------------------------------------------------------------------------
goffice 0.8.12:
diff --git a/goffice/graph/gog-axis-line.c b/goffice/graph/gog-axis-line.c
index 2e5800c..a6892fc 100644
--- a/goffice/graph/gog-axis-line.c
+++ b/goffice/graph/gog-axis-line.c
@@ -2078,6 +2078,7 @@ xyz_process (GogAxisBaseAction action, GogView *view, GogViewPadding *padding,
break;
}
+ g_free (ticks_pos);
gog_chart_map_3d_free (c_map);
return FALSE;
diff --git a/plugins/plot_surface/gog-contour.c b/plugins/plot_surface/gog-contour.c
index bec54df..1ccc824 100644
--- a/plugins/plot_surface/gog-contour.c
+++ b/plugins/plot_surface/gog-contour.c
@@ -1039,6 +1039,7 @@ gog_contour_view_render (GogView *view, GogViewAllocation const *bbox)
go_path_free (lines);
go_path_free (path);
g_object_unref (style);
+ g_free (color);
gog_axis_map_free (x_map);
gog_axis_map_free (y_map);
}
diff --git a/tests/go-demo.c b/tests/go-demo.c
index 5da8b7b..c2fbe6f 100644
--- a/tests/go-demo.c
+++ b/tests/go-demo.c
@@ -222,7 +222,7 @@ insert_histogram_data (GogPlot *plot)
data = go_data_vector_val_new (indexs, 6, NULL);
gog_series_set_dim (series, 0, data, &error);
- data = go_data_vector_val_new (values, 6, NULL);
+ data = go_data_vector_val_new (values, 5, NULL);
gog_series_set_dim (series, 1, data, &error);
}
@@ -503,6 +503,9 @@ main (int argc, char *argv[])
gtk_main ();
+ g_object_unref (priv->xml);
+ g_free (priv);
+
/* Clean libgoffice stuff */
libgoffice_shutdown ();
return 0;
diff --git a/tests/shapes-demo.c b/tests/shapes-demo.c
index d4bc6fd..71d0241 100644
--- a/tests/shapes-demo.c
+++ b/tests/shapes-demo.c
@@ -43,6 +43,7 @@ open_file (GocCanvas* canvas, char* filename)
while (-1 != getline (&s, &n, fd)) {
parse_line (canvas, s);
}
+ free (s);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]