]> spindle.queued.net Git - midori/commitdiff
Release memory of transfer speed strings
authorPaweł Forysiuk <tuxator@o2.pl>
Sat, 5 Mar 2011 13:30:40 +0000 (14:30 +0100)
committerChristian Dywan <christian@twotoasts.de>
Sat, 5 Mar 2011 13:34:27 +0000 (14:34 +0100)
toolbars/midori-transferbar.c

index 4db0b6f423a89c2cc069455153f511b47284cef9..16a5fc627ca5b01e2a6db1d9e9ce536df52290b5 100644 (file)
@@ -97,7 +97,7 @@ midori_transferbar_download_notify_progress_cb (WebKitDownload* download,
     if (time != *last_time)
         transfer = g_format_size_for_display ((size - *last_size) / (time - *last_time));
     else
-        transfer = "?B";
+        transfer = g_strup ("?B");
     /* i18n: Download tooltip, 4KB of 43MB, 130KB/s */
     size_text = g_strdup_printf (_("%s of %s, %s/s"), current, total, transfer);
     if (time - *last_time > 5.0)
@@ -111,6 +111,9 @@ midori_transferbar_download_notify_progress_cb (WebKitDownload* download,
         gtk_progress_bar_get_text (GTK_PROGRESS_BAR (progress)),
         size_text);
     gtk_widget_set_tooltip_text (progress, text);
+    g_free (size_text);
+    g_free (transfer);
+    g_free (text);
 }
 
 static void