And nox ICAL putics works properly.
authorDave West <davew@uncensored.citadel.org>
Thu, 8 Nov 2007 00:15:44 +0000 (00:15 +0000)
committerDave West <davew@uncensored.citadel.org>
Thu, 8 Nov 2007 00:15:44 +0000 (00:15 +0000)
citadel/modules/calendar/serv_calendar.c

index a8ae3b7c9e8a7c5f47527837b7fc33e483558f9c..d9505b33230654840926bf7713756e25b936335f 100644 (file)
@@ -114,6 +114,7 @@ void ical_write_to_cal(struct ctdluser *u, icalcomponent *cal) {
        char *ser = NULL;
        icalcomponent *encaps = NULL;
        struct CtdlMessage *msg = NULL;
+       icalcomponent *tmp=NULL;
 
        if (cal == NULL) return;
 
@@ -121,9 +122,10 @@ void ical_write_to_cal(struct ctdluser *u, icalcomponent *cal) {
         * a full VCALENDAR component, and save that instead.
         */
        if (icalcomponent_isa(cal) != ICAL_VCALENDAR_COMPONENT) {
-               encaps = ical_encapsulate_subcomponent(icalcomponent_new_clone(cal));
+               tmp = icalcomponent_new_clone(cal);
+               encaps = ical_encapsulate_subcomponent(tmp);
                ical_write_to_cal(u, encaps);
-               icalcomponent_free(encaps);
+               icalcomponent_free(tmp);
                return;
        }
 
@@ -173,7 +175,7 @@ void ical_write_to_cal(struct ctdluser *u, icalcomponent *cal) {
        }
 
        /* In either case, now we can free the serialized calendar object */
-       free(ser);
+//     free(ser);
 }