aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-04-25 02:41:00 +0800
committerMilan Crha <mcrha@redhat.com>2009-04-25 02:41:00 +0800
commit65464532b52b16dfaf529208cfcc798ea303711a (patch)
treeb9a3d7cc21f272a0367c98df6c875ce02cfcd4f6 /calendar/gui
parent70fe80d69aec73ea1f4fa830b00ac603546e135d (diff)
downloadgsoc2013-evolution-65464532b52b16dfaf529208cfcc798ea303711a.tar
gsoc2013-evolution-65464532b52b16dfaf529208cfcc798ea303711a.tar.gz
gsoc2013-evolution-65464532b52b16dfaf529208cfcc798ea303711a.tar.bz2
gsoc2013-evolution-65464532b52b16dfaf529208cfcc798ea303711a.tar.lz
gsoc2013-evolution-65464532b52b16dfaf529208cfcc798ea303711a.tar.xz
gsoc2013-evolution-65464532b52b16dfaf529208cfcc798ea303711a.tar.zst
gsoc2013-evolution-65464532b52b16dfaf529208cfcc798ea303711a.zip
Possible leak fix
** Part of fix for bug #571272
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/e-cal-model.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index 4fcfbd7609..ed4eb0f9dd 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -1336,10 +1336,13 @@ search_by_id_and_client (ECalModelPrivate *priv, ECal *client, const ECalCompone
if (comp_data) {
const char *uid;
char *rid = NULL;
+ struct icaltimetype icalrid;
gboolean has_rid = (id->rid && *id->rid);
uid = icalcomponent_get_uid (comp_data->icalcomp);
- rid = icaltime_as_ical_string_r (icalcomponent_get_recurrenceid (comp_data->icalcomp));
+ icalrid = icalcomponent_get_recurrenceid (comp_data->icalcomp);
+ if (!icaltime_is_null_time (icalrid))
+ rid = icaltime_as_ical_string_r (icalrid);
if (uid && *uid) {
if ((!client || comp_data->client == client) && !strcmp (id->uid, uid)) {
@@ -1352,8 +1355,9 @@ search_by_id_and_client (ECalModelPrivate *priv, ECal *client, const ECalCompone
g_free (rid);
return comp_data;
}
- g_free (rid);
}
+
+ g_free (rid);
}
}