Commit 4a2becbd authored by Kevin J. McCarthy's avatar Kevin J. McCarthy
Browse files

Fix memory leak parsing group addresses without a display name.

When there was a group address terminator with no previous
addresses (including the group display-name), an address would be
allocated but not attached to the address list.

Change this to only allocate when last exists.

It would be more correct to not allocate at all unless we are inside a
group list, but I will address that in a separate commit to master.
parent 464a9bc6
Pipeline #242883597 passed with stages
in 3 minutes and 1 second
......@@ -587,11 +587,10 @@ ADDRESS *rfc822_parse_adrlist (ADDRESS *top, const char *s)
/* add group terminator */
cur = rfc822_new_address ();
if (last)
last->next = cur;
last = cur;
last->next = rfc822_new_address ();
last = last->next;
phraselen = 0;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment