aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-05-02 17:47:15 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-06-09 19:34:54 +0800
commite899cd55697dba16f40d146ec3637ddd6f3bc53b (patch)
tree7a77d3976cb3a0783586147a42be5838a195a64b /libempathy-gtk
parent8ff470e1b4aef8310f1cfb8627a46fd5a139489f (diff)
downloadgsoc2013-empathy-e899cd55697dba16f40d146ec3637ddd6f3bc53b.tar
gsoc2013-empathy-e899cd55697dba16f40d146ec3637ddd6f3bc53b.tar.gz
gsoc2013-empathy-e899cd55697dba16f40d146ec3637ddd6f3bc53b.tar.bz2
gsoc2013-empathy-e899cd55697dba16f40d146ec3637ddd6f3bc53b.tar.lz
gsoc2013-empathy-e899cd55697dba16f40d146ec3637ddd6f3bc53b.tar.xz
gsoc2013-empathy-e899cd55697dba16f40d146ec3637ddd6f3bc53b.tar.zst
gsoc2013-empathy-e899cd55697dba16f40d146ec3637ddd6f3bc53b.zip
Don't free an uninitialized variable
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-log-window.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index 10904dd6a..b24643f62 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -725,7 +725,7 @@ log_window_append_call (TplEvent *event,
TplCallEvent *call = TPL_CALL_EVENT (event);
GtkTreeStore *store = log_window->store_events;
GtkTreeIter iter, child;
- gchar *pretty_date, *body, *duration, *finished;
+ gchar *pretty_date, *duration, *finished;
GDateTime *started_date, *finished_date;
GTimeSpan span;
@@ -747,6 +747,8 @@ log_window_append_call (TplEvent *event,
if (tpl_call_event_get_end_reason (call) != TPL_CALL_END_REASON_NO_ANSWER)
{
+ gchar *body;
+
span = tpl_call_event_get_duration (TPL_CALL_EVENT (event));
if (span < 60)
duration = g_strdup_printf (_("%" G_GINT64_FORMAT " seconds"), span);
@@ -772,9 +774,10 @@ log_window_append_call (TplEvent *event,
COL_EVENTS_TARGET, event_get_target (event),
COL_EVENTS_EVENT, event,
-1);
+
+ g_free (body);
}
- g_free (body);
g_free (pretty_date);
g_date_time_unref (started_date);
}