evolution-data-server r10192 - in trunk/calendar: . backends/caldav



Author: mcrha
Date: Tue Mar 24 18:00:32 2009
New Revision: 10192
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=10192&view=rev

Log:
2009-03-24  Milan Crha  <mcrha redhat com>

	** Fix for bug #573187

	* backends/caldav/e-cal-backend-caldav.c: (caldav_server_list_objects),
	(check_calendar_changed_on_server), (synchronize_cache), (pack_cobj):
	More leak fixes.



Modified:
   trunk/calendar/ChangeLog
   trunk/calendar/backends/caldav/e-cal-backend-caldav.c

Modified: trunk/calendar/backends/caldav/e-cal-backend-caldav.c
==============================================================================
--- trunk/calendar/backends/caldav/e-cal-backend-caldav.c	(original)
+++ trunk/calendar/backends/caldav/e-cal-backend-caldav.c	Tue Mar 24 18:00:32 2009
@@ -1002,7 +1002,8 @@
 		return FALSE;
 
 	doc = xmlNewDoc ((xmlChar *) "1.0");
-	root = xmlNewNode (NULL, (xmlChar *) "propfind");
+	root = xmlNewDocNode (doc, NULL, (xmlChar *) "propfind", NULL);
+	xmlDocSetRootElement (doc, root);
 	nsdav = xmlNewNs (root, (xmlChar *) "DAV:", NULL);
 	ns = xmlNewNs (root, (xmlChar *) "http://calendarserver.org/ns/";, (xmlChar *) "CS");
 
@@ -1081,10 +1082,10 @@
 	/* Maybe we should just do a g_strdup_printf here? */
 	/* Prepare request body */
 	doc = xmlNewDoc ((xmlChar *) "1.0");
-	root = xmlNewNode (NULL, (xmlChar *) "calendar-query");
-	nscd = xmlNewNs (root, (xmlChar *) "urn:ietf:params:xml:ns:caldav",
-			 (xmlChar *) "C");
+	root = xmlNewDocNode (doc, NULL, (xmlChar *) "calendar-query", NULL);
+	nscd = xmlNewNs (root, (xmlChar *) "urn:ietf:params:xml:ns:caldav", (xmlChar *) "C");
 	xmlSetNs (root, nscd);
+	xmlDocSetRootElement (doc, root);
 
 	/* Add webdav tags */
 	nsdav = xmlNewNs (root, (xmlChar *) "DAV:", (xmlChar *) "D");
@@ -1494,7 +1495,8 @@
 
 		if (res) {
 			cobjs = g_list_remove (cobjs, ccomp);
-			g_object_unref (ccomp);
+			if (ccomp)
+				g_object_unref (ccomp);
 		}
 
 		caldav_object_free (object, FALSE);
@@ -1938,6 +1940,7 @@
 	}
 
 	objstr = icalcomponent_as_ical_string_r (calcomp);
+	icalcomponent_free (calcomp);
 
 	g_assert (objstr);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]