From 4b9ac3879d25d14cbaaab9237626257c3561f7ff Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 14 Feb 2011 19:15:36 +0100 Subject: Fix few memory leaks --- e-util/e-activity.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'e-util') diff --git a/e-util/e-activity.c b/e-util/e-activity.c index 74d0eeda26..98ee4d1c0b 100644 --- a/e-util/e-activity.c +++ b/e-util/e-activity.c @@ -212,15 +212,16 @@ activity_describe (EActivity *activity) const gchar *text; gdouble percent; - string = g_string_sized_new (256); - cancellable = e_activity_get_cancellable (activity); - percent = e_activity_get_percent (activity); - state = e_activity_get_state (activity); text = e_activity_get_text (activity); if (text == NULL) return NULL; + string = g_string_sized_new (256); + cancellable = e_activity_get_cancellable (activity); + percent = e_activity_get_percent (activity); + state = e_activity_get_state (activity); + if (state == E_ACTIVITY_CANCELLED) { /* Translators: This is a cancelled activity. */ g_string_printf (string, _("%s (cancelled)"), text); -- cgit v1.2.3