[gnumeric] Plug leak.



commit 7dc8c396155f0413a7d621f9fa58d71590f52ddc
Author: Morten Welinder <terra gnome org>
Date:   Fri Mar 22 15:43:56 2013 -0400

    Plug leak.

 NEWS                               |    1 +
 src/dialogs/dialog-printer-setup.c |   12 ++++++------
 src/gnm-pane.c                     |    4 ++--
 3 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/NEWS b/NEWS
index d873905..3d9b8ac 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ Morten:
        * Improve ssconvert error handling.  [#695529]
        * New font selector for toolbar.  [#695031]
        * Embed more artwork.
+       * Plug leaks.
 
 --------------------------------------------------------------------------
 Gnumeric 1.12.1
diff --git a/src/dialogs/dialog-printer-setup.c b/src/dialogs/dialog-printer-setup.c
index 410d45e..f44d65c 100644
--- a/src/dialogs/dialog-printer-setup.c
+++ b/src/dialogs/dialog-printer-setup.c
@@ -409,8 +409,8 @@ static void
 margin_preview_page_available_size (PrinterSetupState *state,
                                    MarginPreviewPageAvailableSize *available_size)
 {
-       GList *child_list;
-       GtkWidget *child_widget, *grid;
+       GList *children, *l;
+       GtkWidget *grid;
        unsigned *widths, *heights;
        GtkRequisition requisition;
        unsigned top, left, width, height, i;
@@ -432,10 +432,9 @@ margin_preview_page_available_size (PrinterSetupState *state,
        heights = g_new0 (guint, nrows);
 
        /* Iterate through all child widgets in the grid */
-       for (child_list = gtk_container_get_children (GTK_CONTAINER (grid));
-            child_list; child_list = child_list->next) {
-
-               child_widget = child_list->data;
+       children = gtk_container_get_children (GTK_CONTAINER (grid));
+       for (l = children; l; l = l->next) {
+               GtkWidget *child_widget = l->data;
 
                /* Determine which cells the align widget spans across */
                gtk_container_child_get (GTK_CONTAINER (grid), GTK_WIDGET (child_widget),
@@ -466,6 +465,7 @@ margin_preview_page_available_size (PrinterSetupState *state,
                        }
                }
        }
+       g_list_free (children);
 
        /* Calculate width of container widget using maximum */
        /* widget widths from above */
diff --git a/src/gnm-pane.c b/src/gnm-pane.c
index 05c228c..751d7cc 100644
--- a/src/gnm-pane.c
+++ b/src/gnm-pane.c
@@ -1810,7 +1810,7 @@ gnm_pane_handle_motion (GnmPane *pane,
        return FALSE;
 }
 
-/* TODO : All the slide_* members of GnmPane really aught to be in
+/* TODO : All the slide_* members of GnmPane really ought to be in
  * SheetControlGUI, most of these routines also belong there.  However, since
  * the primary point of access is via GnmPane and SCG is very large
  * already I'm leaving them here for now.  Move them when we return to
@@ -2035,7 +2035,7 @@ gnm_pane_size_guide_start (GnmPane *pane, gboolean vert, int colrow, int width)
                x0 = x;
                y0 = scg_colrow_distance_get (scg, FALSE,
                                        0, pane->first.row) / zoom;
-               x1= x;
+               x1 = x;
                y1 = scg_colrow_distance_get (scg, FALSE,
                                        0, pane->last_visible.row+1) / zoom;
        } else {


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