aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-cal-model.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/e-cal-model.c')
-rw-r--r--calendar/gui/e-cal-model.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index 19fb146d3e..87c826a226 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -1297,7 +1297,8 @@ search_by_id_and_client (ECalModelPrivate *priv, ECal *client, const ECalCompone
ECalModelComponent *comp_data = g_ptr_array_index (priv->objects, i);
if (comp_data) {
- const char *uid, *rid;
+ const char *uid;
+ char *rid = NULL;
gboolean has_rid = (id->rid && *id->rid);
uid = icalcomponent_get_uid (comp_data->icalcomp);
@@ -1306,11 +1307,15 @@ search_by_id_and_client (ECalModelPrivate *priv, ECal *client, const ECalCompone
if (uid && *uid) {
if ((!client || comp_data->client == client) && !strcmp (id->uid, uid)) {
if (has_rid) {
- if (!(rid && *rid && !strcmp (rid, id->rid)))
+ if (!(rid && *rid && !strcmp (rid, id->rid))) {
+ g_free (rid);
continue;
+ }
}
+ g_free (rid);
return comp_data;
}
+ g_free (rid);
}
}
}