aboutsummaryrefslogtreecommitdiffstats
path: root/transact.c
diff options
context:
space:
mode:
Diffstat (limited to 'transact.c')
-rw-r--r--transact.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/transact.c b/transact.c
index 0ca37d7e..0d40d1bf 100644
--- a/transact.c
+++ b/transact.c
@@ -1240,7 +1240,7 @@ int readheaders(int sock,
if (idp->val.status.mark == XMIT_RCPTBAD)
errlen += strlen(idp->id) + 2;
- xalloca(errmsg, char *, errlen+3);
+ errmsg = xmalloc(errlen + 3);
strcpy(errmsg, errhd);
for (idp = msgblk.recipients; idp; idp = idp->next)
if (idp->val.status.mark == XMIT_RCPTBAD)
@@ -1256,6 +1256,9 @@ int readheaders(int sock,
/* ship out the error line */
stuffline(ctl, errmsg);
+
+ if (errmsg != errhd)
+ free(errmsg);
}
/* issue the delimiter line */