aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2005-07-31 00:41:59 +0000
committerMatthias Andree <matthias.andree@gmx.de>2005-07-31 00:41:59 +0000
commitf510914d839165691dd6ba8dc627699899e07118 (patch)
treee13a0897c311798824224724fb7d5665a9c518f3
parente1811a6ef489584145ebbe520500feb881b79f7d (diff)
downloadfetchmail-f510914d839165691dd6ba8dc627699899e07118.tar.gz
fetchmail-f510914d839165691dd6ba8dc627699899e07118.tar.bz2
fetchmail-f510914d839165691dd6ba8dc627699899e07118.zip
Kill alloca().
svn path=/trunk/; revision=4198
-rw-r--r--fetchmail.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fetchmail.c b/fetchmail.c
index 57b41a61..0d237213 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -478,10 +478,11 @@ int main(int argc, char **argv)
const char* password_prompt = GT_("Enter password for %s@%s: ");
size_t pplen = strlen(password_prompt) + strlen(ctl->remotename) + strlen(ctl->server.pollname) + 1;
- xalloca(tmpbuf, char *, pplen);
+ tmpbuf = xmalloc(pplen);
snprintf(tmpbuf, pplen, password_prompt,
ctl->remotename, ctl->server.pollname);
ctl->password = xstrdup((char *)fm_getpassword(tmpbuf));
+ free(tmpbuf);
}
}
}