From 375d7a4cab817fe72e9caa71dbdeb573ab0a8d74 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Fri, 26 Mar 2004 20:53:16 +0000 Subject: Fixes #53134 2004-03-26 JP Rosevear Fixes #53134 * gui/e-cal-model.c (get_description): make sure to set the string to NULL so that if this component doesn't have a description we don't double free next time we are called svn path=/trunk/; revision=25204 --- calendar/ChangeLog | 8 ++++++++ calendar/gui/e-cal-model.c | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 01e66f7883..5ad7c522b4 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,11 @@ +2004-03-26 JP Rosevear + + Fixes #53134 + + * gui/e-cal-model.c (get_description): make sure to set the string + to NULL so that if this component doesn't have a description we + don't double free next time we are called + 2004-03-26 JP Rosevear * gui/migration.c (migrate_calendars): no need to explicitly add diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index bf1792fd52..1e8acf3334 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -346,9 +346,11 @@ get_description (ECalModelComponent *comp_data) icalproperty *prop; static GString *str = NULL; - if (str) + if (str) { g_string_free (str, TRUE); - + str = NULL; + } + prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_DESCRIPTION_PROPERTY); if (prop) { str = g_string_new (""); -- cgit v1.2.3