[evolution-kolab/ek-wip-porting] ECalBackendKolab: argument fixups in modify_object()



commit ac42b57e8468ce5fa865542ade55290d8585d2c0
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Mon Mar 19 14:57:34 2012 +0100

    ECalBackendKolab: argument fixups in modify_object()
    
    * do not unref *old_component if operation succeeds
    * if old_component is unref'd, set *old_component
      to NULL (do not NULL old_component)

 src/calendar/e-cal-backend-kolab.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/calendar/e-cal-backend-kolab.c b/src/calendar/e-cal-backend-kolab.c
index 61e8edb..4d19a10 100644
--- a/src/calendar/e-cal-backend-kolab.c
+++ b/src/calendar/e-cal-backend-kolab.c
@@ -1112,7 +1112,7 @@ e_cal_backend_kolab_modify_object (ECalBackendSync *backend,
 				g_object_unref (ecaltz);
 			g_object_unref (newcomp);
 			g_object_unref (oldcomp);
-			old_component = NULL;
+			*old_component = NULL;
 			return;
 		}
 
@@ -1133,7 +1133,7 @@ e_cal_backend_kolab_modify_object (ECalBackendSync *backend,
 				g_object_unref (ecaltz);
 			g_object_unref (newcomp);
 			g_object_unref (oldcomp);
-			old_component = NULL;
+			*old_component = NULL;
 			return;
 		}
 		e_cal_backend_notify_component_modified (E_CAL_BACKEND (backend),
@@ -1143,7 +1143,6 @@ e_cal_backend_kolab_modify_object (ECalBackendSync *backend,
 		if (oldtz != NULL)
 			g_object_unref (oldtz);
 	}
-	g_object_unref (oldcomp);
 	ok = kolab_util_calendar_store (ecalcomp,
 	                                ecaltz,
 	                                priv->default_zone,



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