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

Fix memory leak parsing group address.

When there was a group address terminator with no previous addresses,
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
......@@ -587,11 +587,10 @@ ADDRESS *rfc822_parse_adrlist (ADDRESS *top, const char *s)
#endif
/* add group terminator */
cur = rfc822_new_address ();
if (last)
{
last->next = cur;
last = cur;
last->next = rfc822_new_address ();
last = last->next;
}
phraselen = 0;
......
Markdown is supported
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