kind = e_cal_backend_get_kind (E_CAL_BACKEND (cbgw));
/* TODO implement send options for Notes */
- if (kind == ICAL_VJOURNAL_COMPONENT)
+ if (kind == ICAL_VJOURNAL_COMPONENT) {
+ g_object_unref (gconf);
+ g_object_unref (hold->opts);
+ g_free (hold);
+
return FALSE;
+ }
gopts = e_gw_sendoptions_get_general_options (opts);
if (kind == ICAL_VEVENT_COMPONENT) {
ECalBackendStore *store;
EGwConnectionStatus status;
icalcomponent_kind kind;
- GList *item_list, *total_list = NULL, *l;
+ GList *item_list = NULL, *total_list = NULL, *l;
GSList *cache_ids = NULL, *ls;
GPtrArray *uid_array = NULL;
gchar *time_string = NULL;
e_cal_component_get_uid (modified_comp, &uid);
cache_comp = e_cal_backend_store_get_component (store, uid, rid);
+ g_free (rid);
e_cal_component_commit_sequence (modified_comp);
e_cal_component_get_last_modified (modified_comp, &tt);
g_free (modif_comp_str);
g_free (cache_comp_str);
- g_free (rid);
cache_comp_str = NULL;
e_cal_backend_store_put_component (store, modified_comp);
}
status = e_gw_connection_read_cal_ids (cnc, cbgw->priv->container_id, cursor, FALSE, CURSOR_ICALID_LIMIT, position, &item_list);
if (status != E_GW_CONNECTION_STATUS_OK) {
if (status == E_GW_CONNECTION_STATUS_NO_RESPONSE) {
- g_static_mutex_unlock (&connecting);
- return TRUE;
+ goto err_done;
}
e_cal_backend_groupwise_notify_error_code (cbgw, status);
- g_static_mutex_unlock (&connecting);
- return TRUE;
+ goto err_done;
}
if (!item_list || g_list_length (item_list) == 0)
g_ptr_array_foreach (uid_array, (GFunc) g_free, NULL);
g_ptr_array_free (uid_array, TRUE);
+ err_done:
if (item_list) {
g_list_free (item_list);
item_list = NULL;
obj = icalcomponent_as_ical_string_r (icomp);
e_cal_backend_notify_object_created (E_CAL_BACKEND (cbw), obj);
g_free (obj);
+ g_object_unref (comp);
forecasts = weather_info_get_forecast_list (info);
if (forecasts) {
obj = icalcomponent_as_ical_string_r (icomp);
e_cal_backend_notify_object_created (E_CAL_BACKEND (cbw), obj);
g_free (obj);
+ g_object_unref (comp);
}
}
}
{
icalcomponent *comp;
struct icaltimetype dtstamp;
+ gchar *uid;
comp = icalcomponent_new (kind);
- icalcomponent_set_uid (comp, e_cal_component_gen_uid ());
+ uid = e_cal_component_gen_uid ();
+ icalcomponent_set_uid (comp, uid);
+ g_free (uid);
dtstamp = icaltime_current_time_with_zone (icaltimezone_get_utc_timezone ());
icalcomponent_set_dtstamp (comp, dtstamp);
comp = e_cal_component_new ();
- if (!e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (icalcomp)))
+ if (!e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (icalcomp))) {
+ g_object_unref (comp);
continue;
+ }
put_component (fstore, comp);
+
+ g_object_unref (comp);
}
}
GList *l;
gint i;
- seq = g_new0 (gchar *, g_list_length (freebusy));
+ seq = g_new0 (gchar *, g_list_length (freebusy) + 1);
for (i = 0, l = freebusy; l; i++, l = l->next) {
seq[i] = g_strdup (l->data);
}