do strdup again, we desupport ultrix

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12047 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2003-04-16 16:17:49 +00:00
parent 6223cf0f22
commit 470fe54cee

View File

@@ -46,12 +46,11 @@ otp_challenge (OtpContext *ctx, char *user, char *str, size_t len)
ctx->challengep = 0;
ctx->err = NULL;
ctx->user = malloc(strlen(user) + 1);
ctx->user = strdup(user);
if (ctx->user == NULL) {
ctx->err = "Out of memory";
return -1;
}
strcpy(ctx->user, user);
dbm = otp_db_open ();
if (dbm == NULL) {
ctx->err = "Cannot open database";