If the XML calendar data returned by a Microsoft Exchange Web Service
specifies an XML Event E-Mail Address ("EmailAddress"), and no e-mail address
is provided, a condition existed where an ast_calendar_attendee struct would
be allocated but not appended to the list of attendees. Because of that,
the memory associated with the attendee would never be freed. This patch
frees the memory if no e-mail address is provided.
........
Merged revisions 361606 from http://svn.asterisk.org/svn/asterisk/branches/1.8
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@361607
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
if (ast_str_strlen(ctx->cdata)) {
attendee->data = ast_strdup(ast_str_buffer(ctx->cdata));
AST_LIST_INSERT_TAIL(&ctx->event->attendees, attendee, next);
+ } else {
+ ast_free(attendee);
}
ast_debug(3, "EWS: XML: attendee address '%s'\n", ast_str_buffer(ctx->cdata));
ast_str_reset(ctx->cdata);