[goffice] GOStyle: plug leak.



commit bc0692b5a6f1760cb751b35f4b920fbfbfdbeba9
Author: Morten Welinder <terra gnome org>
Date:   Wed May 27 16:09:09 2015 -0400

    GOStyle: plug leak.

 ChangeLog                    |    4 ++++
 goffice/math/go-regression.c |    4 ++--
 goffice/utils/go-style.c     |    5 +++--
 3 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 27316a7..48f7949 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-05-27  Morten Welinder  <terra gnome org>
+
+       * goffice/utils/go-style.c (go_style_set_cairo_line): Plug leak.
+
 2015-05-17  Morten Welinder  <terra gnome org>
 
        * goffice/utils/go-format.c (go_format_output_simple_to_odf):
diff --git a/goffice/math/go-regression.c b/goffice/math/go-regression.c
index cbec9df..866f51d 100644
--- a/goffice/math/go-regression.c
+++ b/goffice/math/go-regression.c
@@ -887,8 +887,8 @@ SUFFIX(log_fitting) (DOUBLE *xs, const DOUBLE *ys, int n,
  * @ys: y-vector.  (Dependent data.)
  * @n: number of data points.
  * @affine: if true, a non-zero constant is allowed.
- * @res: output place for constant[0] and slope1[1], slope2[2],... There will be dim+1 results.
- * @stat_: non-NULL storage for additional results.
+ * @res: (out): place for constant[0] and slope1[1], slope2[2],... There will be dim+1 results.
+ * @stat_: (out): non-NULL storage for additional results.
  *
  * Performs multi-dimensional linear regressions on the input points.
  * Fits to "y = b + a1 * x1 + ... ad * xd".
diff --git a/goffice/utils/go-style.c b/goffice/utils/go-style.c
index ab6310d..4a01c3f 100644
--- a/goffice/utils/go-style.c
+++ b/goffice/utils/go-style.c
@@ -2222,12 +2222,13 @@ go_style_set_cairo_line (GOStyle const *style, cairo_t *cr)
                        if (line_dash->dash[i] == 0.)
                                line_dash->dash[i] = width;
        }
-       if (line_dash != NULL)
+       if (line_dash != NULL) {
                cairo_set_dash (cr,
                                line_dash->dash,
                                line_dash->n_dash,
                                line_dash->offset);
-       else
+               go_line_dash_sequence_free (line_dash);
+       } else
                cairo_set_dash (cr, NULL, 0, 0);
        switch (style->line.pattern) {
        case GO_PATTERN_SOLID:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]