Commit 79741a49 authored by Kevin J. McCarthy's avatar Kevin J. McCarthy

Fix a few memory leaks for idna conversion.

parent fec121b2
Pipeline #35642079 passed with stages
in 14 minutes and 52 seconds
......@@ -305,6 +305,7 @@ retry_name:
if (mutt_addrlist_to_intl (new->addr, &err))
{
mutt_error (_("Error: '%s' is a bad IDN."), err);
FREE (&err);
mutt_sleep (2);
continue;
}
......
......@@ -1077,9 +1077,11 @@ static int parse_group (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err)
if ((addr = mutt_parse_adrlist (NULL, buf->data)) == NULL)
goto bail;
if (mutt_addrlist_to_intl (addr, &estr))
{
{
snprintf (err->data, err->dsize, _("%sgroup: warning: bad IDN '%s'.\n"),
data == 1 ? "un" : "", estr);
FREE (&estr);
rfc822_free_address (&addr);
goto bail;
}
if (data == MUTT_GROUP)
......@@ -1543,6 +1545,7 @@ static int parse_alias (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err)
{
snprintf (err->data, err->dsize, _("Warning: Bad IDN '%s' in alias '%s'.\n"),
estr, tmp->name);
FREE (&estr);
goto bail;
}
......
......@@ -2650,7 +2650,7 @@ int mutt_bounce_message (FILE *fp, HEADER *h, ADDRESS *to)
const char *fqdn = mutt_fqdn (1);
char resent_from[STRING];
int ret;
char *err;
char *err = NULL;
resent_from[0] = '\0';
from = mutt_default_from ();
......@@ -2673,6 +2673,7 @@ int mutt_bounce_message (FILE *fp, HEADER *h, ADDRESS *to)
{
mutt_error (_("Bad IDN %s while preparing resent-from."),
err);
FREE (&err);
rfc822_free_address (&from);
return -1;
}
......
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