[Xfce4-commits] <midori:master> Release memory of transfer speed strings

Christian Dywan noreply at xfce.org
Sat Mar 5 14:36:01 CET 2011


Updating branch refs/heads/master
         to 7dd4fe8ac4e8190720d0bba543fad1fe8002d3ca (commit)
       from c48e7b869b911bef8ddd5decc35b31e410b51d5d (commit)

commit 7dd4fe8ac4e8190720d0bba543fad1fe8002d3ca
Author: Paweł Forysiuk <tuxator at o2.pl>
Date:   Sat Mar 5 14:30:40 2011 +0100

    Release memory of transfer speed strings

 toolbars/midori-transferbar.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/toolbars/midori-transferbar.c b/toolbars/midori-transferbar.c
index 4db0b6f..16a5fc6 100644
--- a/toolbars/midori-transferbar.c
+++ b/toolbars/midori-transferbar.c
@@ -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



More information about the Xfce4-commits mailing list