* ical 'getics' now frees the icalcomponent data
authorArt Cancro <ajc@citadel.org>
Thu, 18 Dec 2008 05:18:44 +0000 (05:18 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 18 Dec 2008 05:18:44 +0000 (05:18 +0000)
  after serializing it but before transmitting it to
  the client.  TODO: suppress duplicate VTIMEZONE components

citadel/modules/calendar/serv_calendar.c

index 27d256e0113c2eb7d6d793a4c3f647b776f1078c..247d177409bac73742b8e7b5f9de3cc586175ded 100644 (file)
@@ -1547,11 +1547,10 @@ void ical_getics(void)
        );
 
        ser = icalcomponent_as_ical_string_r(encaps);
+       icalcomponent_free(encaps);                     /* Don't need this anymore. */
        client_write(ser, strlen(ser));
        free(ser);
        cprintf("\n000\n");
-       icalcomponent_free(encaps);     /* Don't need this anymore. */
-
 }