evolution-data-server r8467 - in trunk/calendar: . libecal



Author: mcrha
Date: Thu Feb  7 19:27:30 2008
New Revision: 8467
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=8467&view=rev

Log:
2008-02-07  Milan Crha  <mcrha redhat com>

	** Fix for bug #509776

	* libecal/e-cal-component.h: (ECalComponentAlarmInstance):
	Structure owns auid point, so do not declare it as const.
	* libecal/e-cal-component.c: (e_cal_component_alarms_free):
	Free instance->auid too, do not leak now.
	* libecal/e-cal-util.c: (add_trigger):
	Store copy of the auid into instance, it owns it now.



Modified:
   trunk/calendar/ChangeLog
   trunk/calendar/libecal/e-cal-component.c
   trunk/calendar/libecal/e-cal-component.h
   trunk/calendar/libecal/e-cal-util.c

Modified: trunk/calendar/libecal/e-cal-component.c
==============================================================================
--- trunk/calendar/libecal/e-cal-component.c	(original)
+++ trunk/calendar/libecal/e-cal-component.c	Thu Feb  7 19:27:30 2008
@@ -5291,6 +5291,7 @@
 
 		instance = l->data;
 		g_assert (instance != NULL);
+		g_free (instance->auid);
 		g_free (instance);
 	}
 

Modified: trunk/calendar/libecal/e-cal-component.h
==============================================================================
--- trunk/calendar/libecal/e-cal-component.h	(original)
+++ trunk/calendar/libecal/e-cal-component.h	Thu Feb  7 19:27:30 2008
@@ -364,7 +364,7 @@
 /* An alarm occurrence, i.e. a trigger instance */
 typedef struct {
 	/* UID of the alarm that triggered */
-	const char *auid;
+	char *auid;
 
 	/* Trigger time, i.e. "5 minutes before the appointment" */
 	time_t trigger;

Modified: trunk/calendar/libecal/e-cal-util.c
==============================================================================
--- trunk/calendar/libecal/e-cal-util.c	(original)
+++ trunk/calendar/libecal/e-cal-util.c	Thu Feb  7 19:27:30 2008
@@ -336,7 +336,7 @@
 	ECalComponentAlarmInstance *instance;
 
 	instance = g_new (ECalComponentAlarmInstance, 1);
-	instance->auid = auid;
+	instance->auid = g_strdup (auid);
 	instance->trigger = trigger;
 	instance->occur_start = occur_start;
 	instance->occur_end = occur_end;



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