From 92cadeb1565154cafec09b0fb3f036cee1b018a7 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Sun, 31 Jul 2005 00:42:44 +0000 Subject: Kill alloca(). svn path=/trunk/; revision=4200 --- transact.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'transact.c') 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 */ -- cgit v1.2.3