[Xfce4-commits] <xfce4-time-out-plugin:master> fix double-free when seconds are not displayed (bug #7538)
Landry Breuil
noreply at xfce.org
Tue Apr 17 12:48:01 CEST 2012
Updating branch refs/heads/master
to 6d306171ebe6a4aec328c5e161578c4afad0a67b (commit)
from d8cc6f486b3fb07da400cf9e15b3cbafb2866037 (commit)
commit 6d306171ebe6a4aec328c5e161578c4afad0a67b
Author: Landry Breuil <landry at xfce.org>
Date: Tue Apr 17 12:45:55 2012 +0200
fix double-free when seconds are not displayed (bug #7538)
panel-plugin/time-out-countdown.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/panel-plugin/time-out-countdown.c b/panel-plugin/time-out-countdown.c
index 2977fd2..d3b48bb 100644
--- a/panel-plugin/time-out-countdown.c
+++ b/panel-plugin/time-out-countdown.c
@@ -482,9 +482,9 @@ time_out_countdown_seconds_to_string (gint seconds,
else
{
/* Round up the number of minutes */
+ g_free (mins);
mins = g_strdup_printf (ngettext ("%d minute", "%d minutes", minutes), minutes + 1);
g_string_printf (str, _("Time left: %s"), mins);
- g_free (mins);
}
}
else
@@ -500,10 +500,10 @@ time_out_countdown_seconds_to_string (gint seconds,
else
{
/* Round up the number of minutes */
+ g_free (mins);
mins = g_strdup_printf (ngettext ("%d minute", "%d minutes", minutes), minutes + 1);
/* Translators: this is %s hours, %s minutes */
g_string_printf (str, _("Time left: %s %s"), hrs, mins);
- g_free (mins);
}
}
}
@@ -539,9 +539,9 @@ time_out_countdown_seconds_to_string (gint seconds,
else
{
/* Round up the number of minutes */
+ g_free (mins);
mins = g_strdup_printf (ngettext ("%d minute", "%d minutes", minutes), minutes + 1);
g_string_printf (str, _("Time left: %s"), mins);
- g_free (mins);
}
}
}
More information about the Xfce4-commits
mailing list