Index: evolution-exchange/calendar/e-cal-backend-exchange.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/calendar/e-cal-backend-exchange.c,v
retrieving revision 1.60
diff -u -p -r1.60 e-cal-backend-exchange.c
--- evolution-exchange/calendar/e-cal-backend-exchange.c	13 Feb 2006 13:20:18 -0000	1.60
+++ evolution-exchange/calendar/e-cal-backend-exchange.c	21 Feb 2006 11:27:53 -0000
@@ -1371,11 +1371,13 @@ e_cal_backend_exchange_make_timestamp_rf
 char *
 e_cal_backend_exchange_get_from_string (ECalBackendSync *backend, ECalComponent *comp)
 {
-	char *name, *addr;
+	char *name, *addr, *from_string;
 
 	e_cal_backend_exchange_get_from (backend, comp, &name, &addr);
-	
-	return g_strdup_printf ("\"%s\" <%s>", name, addr);
+	from_string = g_strdup_printf ("\"%s\" <%s>", name, addr);
+	g_free (name);
+	g_free (addr);
+	return from_string;
 }
 
 gchar *
@@ -1543,6 +1545,7 @@ get_attachment (ECalBackendExchange *cbe
 				attach_file = g_strdup_printf ("%s/%s-%s", cbex->priv->local_attachment_store, uid, filename);
 				// Attach
 				attach_file_url = save_attach_file (attach_file, attach_data, stream_mem->buffer->len);
+				g_free (attach_data);
 				g_free (attach_file);
 				d(printf ("attach file name : %s\n", attach_file_url));
 				list = g_slist_append (list, attach_file_url);
@@ -1622,6 +1625,8 @@ build_msg ( ECalBackendExchange *cbex, E
 	from = camel_internet_address_new ();
 	camel_internet_address_add (from, from_name, from_email);
 	camel_mime_message_set_from (msg, from);
+	g_free (from_name);
+	g_free (from_email);
 	camel_object_unref (from);
 
 	e_cal_component_get_uid (comp, &uid);
Index: evolution-exchange/calendar/e-cal-backend-exchange-calendar.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/calendar/e-cal-backend-exchange-calendar.c,v
retrieving revision 1.50
diff -u -p -r1.50 e-cal-backend-exchange-calendar.c
--- evolution-exchange/calendar/e-cal-backend-exchange-calendar.c	10 Feb 2006 10:10:29 -0000	1.50
+++ evolution-exchange/calendar/e-cal-backend-exchange-calendar.c	21 Feb 2006 11:28:11 -0000
@@ -129,8 +129,11 @@ add_vevent (ECalBackendExchange *cbex,
 			 * TRANSP property, so set it from the busy
 			 * status.
 			 */
-			if (transp)
+			if (transp) {
 				icalcomponent_remove_property (icalcomp,transp);
+				icalproperty_free (transp); 
+				transp = NULL;
+			}
 
 			if (!strcmp (x_val, "BUSY"))
 				transp = icalproperty_new_transp (ICAL_TRANSP_OPAQUE);
@@ -163,11 +166,14 @@ add_vevent (ECalBackendExchange *cbex,
 	 *   user's calendar.
 	 */
 	prop = icalcomponent_get_first_property (icalcomp, ICAL_ORGANIZER_PROPERTY);
-	if (prop && !icalcomponent_get_first_property (icalcomp, ICAL_ATTENDEE_PROPERTY))
+	if (prop && !icalcomponent_get_first_property (icalcomp, ICAL_ATTENDEE_PROPERTY)) {
 		icalcomponent_remove_property (icalcomp, prop);
+		icalproperty_free (prop);
+	}
 
 	/* Now add to the cache */
 	status = e_cal_backend_exchange_add_object (cbex, href, lastmod, icalcomp);
+	
 	return (status == GNOME_Evolution_Calendar_Success);
 }
 
@@ -212,16 +218,22 @@ add_ical (ECalBackendExchange *cbex, con
 		}
 		if (attachment_list) {
 			ecomp = e_cal_component_new ();
-			e_cal_component_set_icalcomponent (ecomp, icalcomponent_new_clone (icalcomp));
+			e_cal_component_set_icalcomponent (ecomp, icalcomp);
 			e_cal_component_set_attachment_list (ecomp, attachment_list);
 			icalcomp = icalcomponent_new_clone (e_cal_component_get_icalcomponent (ecomp));
 			g_object_unref (ecomp);
+			g_slist_foreach (attachment_list, (GFunc) g_free, NULL);
+			g_slist_free (attachment_list);
 		}
 		status = add_vevent (cbex, href, lastmod, icalcomp);
 		icalcomponent_free (icalcomp);
 		return status;
 	} else if (kind != ICAL_VCALENDAR_COMPONENT) {
 		icalcomponent_free (icalcomp);
+		if (attachment_list) {
+			g_slist_foreach (attachment_list, (GFunc) g_free, NULL);
+			g_slist_free (attachment_list);
+		}
 		return FALSE;
 	}
 
@@ -249,6 +261,10 @@ add_ical (ECalBackendExchange *cbex, con
 	}
 	icalcomponent_free (icalcomp);
 
+	if (attachment_list) {
+		g_slist_foreach (attachment_list, (GFunc) g_free, NULL);
+		g_slist_free (attachment_list);
+	}
 	return TRUE;
 }
 
@@ -926,8 +942,9 @@ update_x_properties (ECalBackendExchange
 		} else if (!strcmp (x_name, "X-MICROSOFT-CDO-IMPORTANCE")) {
 			icalproperty_set_x (icalprop, importance);
 			prop_set |= IMPORTANCE;
-		} else if (!strcmp (x_name, "X-MICROSOFT-CDO-MODPROPS"))
+		} else if (!strcmp (x_name, "X-MICROSOFT-CDO-MODPROPS")) {
 			icalcomponent_remove_property (icalcomp, icalprop);
+		}
 
 		icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY);
 	}
@@ -1953,6 +1970,7 @@ discard_alarm (ECalBackendSync *backend,
 		g_free (ecomp_str);
 	}
 	g_object_unref (ecomp);
+	icalcomponent_free (icalcomp);
 
 	return result;
 }
Index: evolution-exchange/calendar/e-cal-backend-exchange-tasks.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/calendar/e-cal-backend-exchange-tasks.c,v
retrieving revision 1.20
diff -u -p -r1.20 e-cal-backend-exchange-tasks.c
--- evolution-exchange/calendar/e-cal-backend-exchange-tasks.c	23 Aug 2005 08:28:24 -0000	1.20
+++ evolution-exchange/calendar/e-cal-backend-exchange-tasks.c	21 Feb 2006 11:28:28 -0000
@@ -804,9 +804,10 @@ get_changed_tasks (ECalBackendExchange *
 		}
 		e_cal_component_commit_sequence (ecal);
 		icalcomp = e_cal_component_get_icalcomponent (ecal);
-		if (icalcomp)
+		if (icalcomp) {
 			e_cal_backend_exchange_add_object (cbex, result->href, 
 						modtime, icalcomp);
+		}
 	} /* End while */
 	status = e2k_result_iter_free (iter);
 
@@ -854,6 +855,8 @@ get_changed_tasks (ECalBackendExchange *
 			icalcomponent_free (ecalbexcomp->icomp);
 			ecalbexcomp->icomp = icalcomponent_new_clone (e_cal_component_get_icalcomponent (ecomp));
 			g_object_unref (ecomp);
+			g_slist_foreach (attachment_list, (GFunc) g_free, NULL);
+			g_slist_free (attachment_list);
 		}
 	}
 	status = e2k_result_iter_free (iter);
@@ -894,6 +897,8 @@ get_changed_tasks (ECalBackendExchange *
 			icalcomponent_free (ecalbexcomp->icomp);
 			ecalbexcomp->icomp = icalcomponent_new_clone (e_cal_component_get_icalcomponent (ecomp));
 			g_object_unref (ecomp);
+			g_slist_foreach (attachment_list, (GFunc) g_free, NULL);
+			g_slist_free (attachment_list);
 		}
 		g_free (body);
 	}
@@ -1090,6 +1095,7 @@ create_task_object (ECalBackendSync *bac
 	}
 
 	*return_uid = g_strdup (temp_comp_uid); 
+	icalcomponent_free (real_icalcomp);
 	return GNOME_Evolution_Calendar_Success;
 }
 
@@ -1154,7 +1160,7 @@ modify_task_object (ECalBackendSync *bac
         cache_comp = e_cal_component_new ();
         e_cal_component_set_icalcomponent (cache_comp, ecalbexcomp->icomp);
 	*old_object = e_cal_component_get_as_string (cache_comp);
-	g_free (cache_comp);
+	//g_free (cache_comp);
 	
 	summary = icalcomponent_get_summary (icalcomp);
 	if (!summary)
@@ -1178,6 +1184,7 @@ modify_task_object (ECalBackendSync *bac
 	g_free (comp_str);
 	if (!icalcomp)
 		return GNOME_Evolution_Calendar_OtherError;
+	icalcomponent_free (icalcomp);
 
 	get_from (backend, new_comp, &from_name, &from_addr);
                                                                                 
@@ -1190,12 +1197,14 @@ modify_task_object (ECalBackendSync *bac
 	status = e2k_context_proppatch (e2kctx, NULL, ecalbexcomp->href, props, FALSE, NULL);
 	comp_str = e_cal_component_get_as_string (new_comp);
 	icalcomp = icalparser_parse_string (comp_str);
+	g_free (comp_str);
 	if (E2K_HTTP_STATUS_IS_SUCCESSFUL (status)){
 		status = put_body(new_comp, e2kctx, NULL, ecalbexcomp->href, from_name, from_addr, 
 					attach_body_crlf, boundary, NULL);
 		if (E2K_HTTP_STATUS_IS_SUCCESSFUL (status))
 			e_cal_backend_exchange_modify_object (ecalbex, icalcomp, mod);
 	}
+	icalcomponent_free (icalcomp);
 	return GNOME_Evolution_Calendar_Success;
 }
 
Index: evolution-data-server/calendar/libecal/e-cal-util.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libecal/e-cal-util.c,v
retrieving revision 1.14
diff -u -p -r1.14 e-cal-util.c
--- evolution-data-server/calendar/libecal/e-cal-util.c	10 Jan 2006 07:55:34 -0000	1.14
+++ evolution-data-server/calendar/libecal/e-cal-util.c	21 Feb 2006 11:29:19 -0000
@@ -123,11 +123,14 @@ e_cal_util_new_component (icalcomponent_
 {
 	icalcomponent *comp;
 	struct icaltimetype dtstamp;
+	char *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);
 	dtstamp = icaltime_current_time_with_zone (icaltimezone_get_utc_timezone ());
 	icalcomponent_set_dtstamp (comp, dtstamp);
+	g_free (uid);
 
 	return comp;
 }
