* potential leak while saving edited events fixed.
authorWilfried Göesgens <willi@citadel.org>
Fri, 12 Sep 2008 10:17:10 +0000 (10:17 +0000)
committerWilfried Göesgens <willi@citadel.org>
Fri, 12 Sep 2008 10:17:10 +0000 (10:17 +0000)
webcit/event.c

index d3aac336f855386353cec75c3a569954aaec9841..5db5d32fe9cb6f31863915b6425a1c9acc9b6a7f 100644 (file)
@@ -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;
                }
 
        }