evolution-exchange r1586 - in trunk: . calendar



Author: pchen
Date: Mon Feb 25 11:02:16 2008
New Revision: 1586
URL: http://svn.gnome.org/viewvc/evolution-exchange?rev=1586&view=rev

Log:
2008-02-25  Chenthill Palanisamy  <pchenthill novell com>

        * calendar/e-cal-backend-exchange-calendar.c: (receive_objects):
        * calendar/e-cal-backend-exchange-tasks.c:
        * (receive_task_objects): Free
        the memory returned by e_cal_component_get_recurid_as_string.                                                                      



Modified:
   trunk/ChangeLog
   trunk/calendar/e-cal-backend-exchange-calendar.c
   trunk/calendar/e-cal-backend-exchange-tasks.c

Modified: trunk/calendar/e-cal-backend-exchange-calendar.c
==============================================================================
--- trunk/calendar/e-cal-backend-exchange-calendar.c	(original)
+++ trunk/calendar/e-cal-backend-exchange-calendar.c	Mon Feb 25 11:02:16 2008
@@ -1581,8 +1581,8 @@
 	icalcomponent_free (icalcomp);
 
 	for (l = comps; l; l= l->next) {
-		const char *uid, *rid;
-		char *icalobj;
+		const char *uid;
+		char *icalobj, *rid = NULL;
 		char *object = NULL;
 
 		subcomp = l->data;
@@ -1614,8 +1614,10 @@
 					status = remove_object (backend, cal, uid, NULL,
 								CALOBJ_MOD_ALL, &old_object,
 								NULL);
-					if (status != GNOME_Evolution_Calendar_Success)
+					if (status != GNOME_Evolution_Calendar_Success) {
+						g_free (rid);
 						goto error;
+					}
 					id = e_cal_component_get_id (comp);
 					e_cal_backend_notify_object_removed (E_CAL_BACKEND (backend), id,
 									     old_object, NULL);
@@ -1633,8 +1635,10 @@
 									  &old_object, &new_object, NULL, NULL);
 					d(printf ("Modify this particular instance : %s\n", rid));
 					d(printf ("Modify object : %s\n", icalobj));
-					if (status != GNOME_Evolution_Calendar_Success)
+					if (status != GNOME_Evolution_Calendar_Success) {
+						g_free (rid);
 						goto error;
+					}
 					e_cal_backend_notify_object_modified (E_CAL_BACKEND (backend),
 									      old_object, new_object);
 					g_free (new_object);
@@ -1651,8 +1655,10 @@
 
 				e_cal_backend_exchange_cache_unlock (cbex);
 				status = create_object (backend, cal, &icalobj, &returned_uid);
-				if (status != GNOME_Evolution_Calendar_Success)
+				if (status != GNOME_Evolution_Calendar_Success) {
+					g_free (rid);
 					goto error;
+				}
 
 				object = icalobj;
 				e_cal_backend_notify_object_created (E_CAL_BACKEND (backend), icalobj);
@@ -1688,9 +1694,11 @@
 			break;
 		default:
 			status = GNOME_Evolution_Calendar_UnsupportedMethod;
+			g_free (rid);
 			goto error;
 		}
 		g_object_unref (comp);
+		g_free (rid);
 	}
 	g_list_free (comps);
 	return status;

Modified: trunk/calendar/e-cal-backend-exchange-tasks.c
==============================================================================
--- trunk/calendar/e-cal-backend-exchange-tasks.c	(original)
+++ trunk/calendar/e-cal-backend-exchange-tasks.c	Mon Feb 25 11:02:16 2008
@@ -1329,8 +1329,8 @@
                 return GNOME_Evolution_Calendar_InvalidObject;
 
 	for (l = comps; l; l = l->next) {
-                const char *uid, *rid;
-                char *calobj;
+                const char *uid;
+                char *calobj, *rid = NULL;
 
                 subcomp = l->data;
 
@@ -1354,8 +1354,10 @@
 
 			e_cal_backend_exchange_cache_unlock (cbex);
                         status = modify_task_object (backend, cal, calobj, CALOBJ_MOD_THIS, &old_object, NULL);
-                        if (status != GNOME_Evolution_Calendar_Success)
+                        if (status != GNOME_Evolution_Calendar_Success) {
+				g_free (rid);
                                 goto error;
+			}
 
                         e_cal_backend_notify_object_modified (E_CAL_BACKEND (backend), old_object, calobj);
 			g_free (old_object);
@@ -1367,12 +1369,14 @@
 			status = create_task_object (backend, cal, &calobj, &returned_uid);
                         if (status != GNOME_Evolution_Calendar_Success) {
 				g_free (calobj);
+				g_free (rid);
                                 goto error;
 			}
 
                         e_cal_backend_notify_object_created (E_CAL_BACKEND (backend), calobj);
 			g_free (calobj);
                 }
+		g_free (rid);
         }
 
         g_list_free (comps);



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