diff -urN ximian-connector-2.4.2.debian/addressbook/e-book-backend-exchange.c ximian-connector-2.4.2/addressbook/e-book-backend-exchange.c
--- ximian-connector-2.4.2.debian/addressbook/e-book-backend-exchange.c	2005-10-21 08:51:33.000000000 -0300
+++ ximian-connector-2.4.2/addressbook/e-book-backend-exchange.c	2006-02-01 07:30:49.000000000 -0400
@@ -565,6 +565,8 @@
 
 	if (status != E2K_HTTP_MULTI_STATUS) {
 		bepriv->connected = FALSE;
+		if (nresults)
+			e2k_results_free (results, nresults);
 		return GNOME_Evolution_Addressbook_OtherError;
 	}
 
@@ -576,6 +578,8 @@
 
 	if (!(access & MAPI_ACCESS_READ)) {
 		bepriv->connected = FALSE;
+		if (nresults)
+			e2k_results_free (results, nresults);
 		return GNOME_Evolution_Addressbook_PermissionDenied;
 	}
 
@@ -1385,6 +1389,8 @@
 			g_object_unref (book);
 			g_object_unref (*contact);
 			*contact = NULL;
+			if (nresults)
+				e2k_results_free (results, nresults);
 			return GNOME_Evolution_Addressbook_OtherError;
 		}
 
@@ -1393,6 +1399,7 @@
 		else
 			old_contact = NULL;
 
+		e2k_results_free (results, nresults);
 		props = props_from_contact (be, *contact, old_contact);
 		status = e2k_context_proppatch (bepriv->ctx, NULL, uri,
 						props, FALSE, NULL);
diff -urN ximian-connector-2.4.2.debian/calendar/e-cal-backend-exchange.c ximian-connector-2.4.2/calendar/e-cal-backend-exchange.c
--- ximian-connector-2.4.2.debian/calendar/e-cal-backend-exchange.c	2005-11-28 07:39:28.000000000 -0400
+++ ximian-connector-2.4.2/calendar/e-cal-backend-exchange.c	2006-02-01 07:34:39.000000000 -0400
@@ -367,6 +367,7 @@
 		if (prop)
 			access = atoi (prop);
 	}
+	e2k_results_free (results, nresults);
 
 	if (!(access & MAPI_ACCESS_READ)) {
 		g_mutex_unlock (cbex->priv->open_lock);
diff -urN ximian-connector-2.4.2.debian/debian/changelog ximian-connector-2.4.2/debian/changelog
--- ximian-connector-2.4.2.debian/debian/changelog	2006-01-31 08:57:36.000000000 -0400
+++ ximian-connector-2.4.2/debian/changelog	2006-01-31 08:29:35.000000000 -0400
@@ -1,3 +1,11 @@
+ximian-connector (2.4.2-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Backport memory leak fix from CVS:
+    http://bugzilla.gnome.org/attachment.cgi?id=58445&action=view
+
+ -- Ben Armstrong <ben@bgpc.dymaxion.ca>  Tue, 31 Jan 2006 08:27:27 -0400
+
 ximian-connector (2.4.2-1) unstable; urgency=low
 
   * New upstream release
diff -urN ximian-connector-2.4.2.debian/mail/mail-stub-exchange.c ximian-connector-2.4.2/mail/mail-stub-exchange.c
--- ximian-connector-2.4.2.debian/mail/mail-stub-exchange.c	2005-10-21 07:35:15.000000000 -0300
+++ ximian-connector-2.4.2/mail/mail-stub-exchange.c	2006-02-01 07:44:08.000000000 -0400
@@ -577,12 +577,16 @@
 		if (!background) {
 			got_folder_error (mfld, _("Could not open folder: Permission denied"));
 		}
+		if (nresults)
+			e2k_results_free (results, nresults);
 		return FALSE;
 	} else if (!E2K_HTTP_STATUS_IS_SUCCESSFUL (status)) {
 		g_warning ("got_folder_props: %d", status);
 		if (!background) {
 			got_folder_error (mfld, _("Could not open folder"));
 		}
+		if (nresults)
+			e2k_results_free (results, nresults);
 		return FALSE;
 	}
 
@@ -599,6 +603,7 @@
 		if (!background) {
 			got_folder_error (mfld, _("Could not open folder: Permission denied"));
 		}
+		e2k_results_free (results, nresults);
 		return FALSE;
 	}
 	readonly = (mfld->access & (MAPI_ACCESS_MODIFY | MAPI_ACCESS_CREATE_CONTENTS)) == 0;
@@ -607,6 +612,8 @@
 	if (prop)
 		mfld->deleted_count = atoi (prop);
 
+	e2k_results_free (results, nresults);
+
 	rn = e2k_restriction_andv (
 		e2k_restriction_prop_bool (E2K_PR_DAV_IS_COLLECTION,
 					   E2K_RELOP_EQ, FALSE),
@@ -893,6 +900,8 @@
 					     &results, &nresults);
 
 	if (!E2K_HTTP_STATUS_IS_SUCCESSFUL (status) || !nresults) {
+		if (nresults)
+			e2k_results_free (results, nresults);
 		g_warning ("got_sync_deleted_props: %d", status);
 		return;
 	}
@@ -907,6 +916,8 @@
 	if (prop)
 		visible_count = atoi (prop);
 
+	e2k_results_free (results, nresults);
+
 	if (visible_count >= mfld->messages->len) {
 		if (mfld->deleted_count == deleted_count)
 			return;
@@ -1872,6 +1883,8 @@
 		g_string_free (message, FALSE);
 		e2k_results_free (results, nresults);
 	}
+	else if (nresults)
+		e2k_results_free (results, nresults);
 
 	return status;
 }
@@ -1891,12 +1904,16 @@
 				       mapi_message_props,
 				       n_mapi_message_props,
 				       &results, &nresults);
-	if (!E2K_HTTP_STATUS_IS_SUCCESSFUL (status))
+	if (!E2K_HTTP_STATUS_IS_SUCCESSFUL (status)) {
+		if (nresults)
+			e2k_results_free (results, nresults);
 		return status;
+	}
 	if (!nresults)
 		return E2K_HTTP_MALFORMED;
 
 	headers = mail_util_mapi_to_smtp_headers (results[0].props);
+	e2k_results_free (results, nresults);
 
 	message = g_byte_array_new ();
 	g_byte_array_append (message, headers, strlen (headers));
@@ -1929,12 +1946,16 @@
 
 	status = e2k_context_propfind (mse->ctx, op, uri, &prop, 1,
 				       &results, &nresults);
-	if (!E2K_HTTP_STATUS_IS_SUCCESSFUL (status))
+	if (!E2K_HTTP_STATUS_IS_SUCCESSFUL (status)) {
+		if (nresults)
+			e2k_results_free (results, nresults);
 		return status;
+	}
 	if (!nresults)
 		return E2K_HTTP_MALFORMED;
 
 	delegator_dn = e2k_properties_get_prop (results[0].props, PR_RCVD_REPRESENTING_EMAIL_ADDRESS);
+	e2k_results_free (results, nresults);
 	if (!delegator_dn)
 		return E2K_HTTP_OK;
 
diff -urN ximian-connector-2.4.2.debian/storage/exchange-config-listener.c ximian-connector-2.4.2/storage/exchange-config-listener.c
--- ximian-connector-2.4.2.debian/storage/exchange-config-listener.c	2005-09-28 10:43:54.000000000 -0300
+++ ximian-connector-2.4.2/storage/exchange-config-listener.c	2006-02-02 14:52:45.000000000 -0400
@@ -305,9 +305,12 @@
 	authtype  = camel_url->authmech;
 	url_string = camel_url_to_string (camel_url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS);
 
-	if (!user_name) 
+	if (!user_name) {
+		g_free (url_string);
+		camel_url_free (camel_url);
 		return;
-
+	}
+				 
 	client = gconf_client_get_default ();
 
 	if (folder_type == EXCHANGE_CONTACTS_FOLDER)
@@ -348,6 +351,8 @@
 			}
 		}
 	}
+	g_free (url_string);
+	camel_url_free (camel_url);
 	g_object_unref (source_list);
 	g_object_unref (client);
 }
@@ -681,14 +686,14 @@
 		    (param1 && param2 && strcmp (param1, param2))) { /* Differing */
 			g_free (param1);
 			g_free (param2);
-			g_free (curl1);
-			g_free (curl2);
+			camel_url_free (curl1);
+			camel_url_free (curl2);
 			return FALSE;
 		}		
 		g_free (param1);
 		g_free (param2);
 	}
-	g_free (curl1);
-	g_free (curl2);
+	camel_url_free (curl1);
+	camel_url_free (curl2);
 	return TRUE;
 }
