summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--multiload/netspeed.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/multiload/netspeed.c b/multiload/netspeed.c
index 7d46ec7a..21747881 100644
--- a/multiload/netspeed.c
+++ b/multiload/netspeed.c
@@ -36,8 +36,14 @@ void netspeed_add(NetSpeed *ns, gulong tx)
static char*
format_rate_for_display(guint rate)
{
- char* bytes = g_format_size(rate);
- return g_strdup_printf(_("%s/s"), bytes);
+ char *bytes;
+ char *text;
+
+ bytes = g_format_size (rate);
+ text = g_strdup_printf (_("%s/s"), bytes);
+ g_free (bytes);
+
+ return text;
}
char* netspeed_get(NetSpeed *ns)