From 6c6043ec448ab89bf7e0241c2fa8cbf3d68299ce Mon Sep 17 00:00:00 2001 From: Johan Danielsson Date: Thu, 18 Apr 2002 09:14:51 +0000 Subject: [PATCH] (krb5_get_init_creds_password): const qualify git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10913 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/init_creds_pw.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/krb5/init_creds_pw.c b/lib/krb5/init_creds_pw.c index 0288a6a34..77a0ea724 100644 --- a/lib/krb5/init_creds_pw.c +++ b/lib/krb5/init_creds_pw.c @@ -407,11 +407,12 @@ krb5_get_init_creds_password(krb5_context context, if (password == NULL) { krb5_prompt prompt; - char *p; + char *p, *q; krb5_unparse_name (context, this_cred.client, &p); - asprintf (&prompt.prompt, "%s's Password: ", p); + asprintf (&q, "%s's Password: ", p); free (p); + prompt.prompt = q; password_data.data = buf; password_data.length = sizeof(buf); prompt.hidden = 1; @@ -419,7 +420,7 @@ krb5_get_init_creds_password(krb5_context context, prompt.type = KRB5_PROMPT_TYPE_PASSWORD; ret = (*prompter) (context, data, NULL, NULL, 1, &prompt); - free (prompt.prompt); + free (q); if (ret) { memset (buf, 0, sizeof(buf)); ret = KRB5_LIBOS_PWDINTR;