]> spindle.queued.net Git - midori/commitdiff
Plug leaks and don't set name in JSON import
authorPaweł Forysiuk <tuxator@o2.pl>
Sun, 3 Apr 2011 21:25:59 +0000 (23:25 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sun, 3 Apr 2011 21:25:59 +0000 (23:25 +0200)
midori/main.c

index f17ff7d97749ff57e855798571e5df33d0416a8e..3b841ccae4bf74d4ce44fd87db1b2a554b0e97ba 100644 (file)
@@ -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"))