[Xfce4-commits] <midori:master> Plug leaks and don't set name in JSON import

Christian Dywan noreply at xfce.org
Sun Apr 3 23:36:03 CEST 2011


Updating branch refs/heads/master
         to 706fc6d063b2e988b0b8988efd49a39775013a95 (commit)
       from 1e5e1710ee4da64bfa3565b0a50135918d250351 (commit)

commit 706fc6d063b2e988b0b8988efd49a39775013a95
Author: Paweł Forysiuk <tuxator at o2.pl>
Date:   Sun Apr 3 23:25:59 2011 +0200

    Plug leaks and don't set name in JSON import

 midori/main.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/midori/main.c b/midori/main.c
index f17ff7d..3b841cc 100644
--- a/midori/main.c
+++ b/midori/main.c
@@ -1525,7 +1525,6 @@ speeddial_new_from_file (const gchar* config,
             }
             else if (g_str_equal (key, "href") && (*val && strncmp (val, "#", 1)))
             {
-                g_key_file_set_value (key_file, dial_id, "name", slot);
                 g_key_file_set_value (key_file, dial_id, "uri", val);
             }
             else if (g_str_equal (key, "img") && *val)
@@ -1555,9 +1554,10 @@ speeddial_new_from_file (const gchar* config,
             {
                 guint thumb_size;
                 gchar* thumb_size_type;
+                gchar* size_tmp = g_strndup (val + 1, strlen (val) - 3);
 
-                /* FIXME: leaked string */
-                thumb_size = atoi (g_strndup (val + 1, strlen (val) - 3));
+                thumb_size = atoi (size_tmp);
+                g_free (size_tmp);
                 if (thumb_size == 80)
                     thumb_size_type = g_strdup ("SMALL");
                 else if (thumb_size == 240)
@@ -1570,7 +1570,6 @@ speeddial_new_from_file (const gchar* config,
             }
             else if (g_str_equal (key, "title") && *val)
             {
-                g_key_file_set_value (key_file, dial_id, "name", slot);
                 g_key_file_set_value (key_file, dial_id, key, val + 3);
             }
             else if (g_str_equal (key, "width"))



More information about the Xfce4-commits mailing list