* Fixes NB#90206, fixes a memory leak
authorSergio Villar Senin <svillar@igalia.com>
Thu, 16 Oct 2008 18:24:21 +0000 (18:24 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Thu, 16 Oct 2008 18:24:21 +0000 (18:24 +0000)
pmo-trunk-r6075

src/hildon2/modest-msg-view-window.c

index 562b989..20202e5 100644 (file)
@@ -780,6 +780,7 @@ select_next_valid_row (GtkTreeModel *model,
                                if (msg_is_visible (header, is_outbox)) {
                                        next = gtk_tree_model_get_path (model, &tmp_iter);
                                        *row_reference = gtk_tree_row_reference_new (model, next);
                                if (msg_is_visible (header, is_outbox)) {
                                        next = gtk_tree_model_get_path (model, &tmp_iter);
                                        *row_reference = gtk_tree_row_reference_new (model, next);
+                                       gtk_tree_path_free (next);
                                        retval = TRUE;
                                        finished = TRUE;
                                }
                                        retval = TRUE;
                                        finished = TRUE;
                                }
@@ -809,6 +810,7 @@ select_next_valid_row (GtkTreeModel *model,
                                   message */
                                finished = TRUE;
                        }
                                   message */
                                finished = TRUE;
                        }
+                       gtk_tree_path_free (next);
                } else {
                        /* If there are no more messages and we don't
                           want to start again in the first one then
                } else {
                        /* If there are no more messages and we don't
                           want to start again in the first one then
@@ -819,8 +821,6 @@ select_next_valid_row (GtkTreeModel *model,
 
        /* Free */
        gtk_tree_path_free (path);
 
        /* Free */
        gtk_tree_path_free (path);
-       if (next)
-               gtk_tree_path_free (next);
 
        return retval;
 }
 
        return retval;
 }