From: Wilfried Göesgens Date: Fri, 12 Sep 2008 10:17:10 +0000 (+0000) Subject: * potential leak while saving edited events fixed. X-Git-Tag: v7.86~1944 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=5253b14020036f0c0e1dabc09f9b98f2803050b2;p=citadel.git * potential leak while saving edited events fixed. --- diff --git a/webcit/event.c b/webcit/event.c index d3aac336f..5db5d32fe 100644 --- a/webcit/event.c +++ b/webcit/event.c @@ -765,6 +765,7 @@ STARTOVER: for (attendee = icalcomponent_get_first_property(vevent, ICAL_ATTENDE } icalmemory_free_ring (); icalcomponent_free(encaps); + encaps = NULL; } /** Or, check attendee availability if the user asked for that. */ @@ -777,6 +778,11 @@ STARTOVER: for (attendee = icalcomponent_get_first_property(vevent, ICAL_ATTENDE display_edit_individual_event(encaps, msgnum, from, unread); icalcomponent_free(encaps); + encaps = NULL; + } + if (encaps != NULL) { + icalcomponent_free(encaps); + encaps = NULL; } }