diff options
Diffstat (limited to 'res/res_calendar_icalendar.c')
-rw-r--r-- | res/res_calendar_icalendar.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/res/res_calendar_icalendar.c b/res/res_calendar_icalendar.c index b177b4941..dc7b5f31c 100644 --- a/res/res_calendar_icalendar.c +++ b/res/res_calendar_icalendar.c @@ -261,10 +261,12 @@ static void icalendar_add_event(icalcomponent *comp, struct icaltime_span *span, return; } data = icalproperty_get_attendee(prop); - if (!ast_strlen_zero(data)) { - attendee->data = ast_strdup(data);; - AST_LIST_INSERT_TAIL(&event->attendees, attendee, next); + if (ast_strlen_zero(data)) { + ast_free(attendee); + continue; } + attendee->data = ast_strdup(data);; + AST_LIST_INSERT_TAIL(&event->attendees, attendee, next); } |