diff options
author | Milan Crha <mcrha@redhat.com> | 2009-04-25 02:44:14 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2009-04-25 02:44:14 +0800 |
commit | 562eb306e98deb574bef3f8c950b89d34b98b4a5 (patch) | |
tree | 41bcf9989bf4500e93b4e74f6ff589c538f8b0a0 | |
parent | 3e3e183331986309fbea73f70f049cbe52f2d19f (diff) | |
download | gsoc2013-evolution-562eb306e98deb574bef3f8c950b89d34b98b4a5.tar gsoc2013-evolution-562eb306e98deb574bef3f8c950b89d34b98b4a5.tar.gz gsoc2013-evolution-562eb306e98deb574bef3f8c950b89d34b98b4a5.tar.bz2 gsoc2013-evolution-562eb306e98deb574bef3f8c950b89d34b98b4a5.tar.lz gsoc2013-evolution-562eb306e98deb574bef3f8c950b89d34b98b4a5.tar.xz gsoc2013-evolution-562eb306e98deb574bef3f8c950b89d34b98b4a5.tar.zst gsoc2013-evolution-562eb306e98deb574bef3f8c950b89d34b98b4a5.zip |
Possible leak fix
** Part of fix for bug #571272
-rw-r--r-- | calendar/ChangeLog | 6 | ||||
-rw-r--r-- | calendar/gui/e-cal-model.c | 8 |
2 files changed, 12 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 306e5bda37..b97027df55 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,9 @@ +2009-04-24 Milan Crha <mcrha@redhat.com> + + ** Part of fix for bug #571272 + + * gui/e-cal-model.c: (search_by_id_and_client): Possible leak fix. + 2009-04-13 Chenthill Palanisamy <pchenthill@novell.com> Fixes #561312 diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index 4007e1236f..bdb9321690 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); } } |