[epiphany] ephy-web-view: fix GList leak



commit ed9b5563be8ad98d683513eef0db5931f674890e
Author: Pavel Vasin <rat4vier gmail com>
Date:   Fri Jun 8 18:19:21 2012 +0400

    ephy-web-view: fix GList leak
    
    https://bugzilla.gnome.org/show_bug.cgi?id=677720

 embed/ephy-web-view.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index cf1efe3..f0b3d8f 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -2637,7 +2637,7 @@ ephy_web_view_copy_back_history (EphyWebView *source,
   WebKitWebView *source_view, *dest_view;
   WebKitWebBackForwardList* source_bflist, *dest_bflist;
   WebKitWebHistoryItem *item;
-  GList *items;
+  GList *items, *i;
 
   g_return_if_fail(EPHY_IS_WEB_VIEW(source));
   g_return_if_fail(EPHY_IS_WEB_VIEW(dest));
@@ -2652,8 +2652,8 @@ ephy_web_view_copy_back_history (EphyWebView *source,
   /* We want to add the items in the reverse order here, so the
      history ends up the same */
   items = g_list_reverse (items);
-  for (; items; items = items->next) {
-    item = webkit_web_history_item_copy ((WebKitWebHistoryItem*)items->data);
+  for (i = items; i; i = i->next) {
+    item = webkit_web_history_item_copy ((WebKitWebHistoryItem*)i->data);
     webkit_web_back_forward_list_add_item (dest_bflist, item);
     g_object_unref (item);
   }



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