summaryrefslogtreecommitdiff
path: root/source4/heimdal/kuser/kinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/heimdal/kuser/kinit.c')
-rw-r--r--source4/heimdal/kuser/kinit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/heimdal/kuser/kinit.c b/source4/heimdal/kuser/kinit.c
index 4208fa83e0..dd122b5ce7 100644
--- a/source4/heimdal/kuser/kinit.c
+++ b/source4/heimdal/kuser/kinit.c
@@ -488,14 +488,14 @@ get_new_tickets(krb5_context context,
addrs_flag ? FALSE : TRUE);
if (renew_life == NULL && renewable_flag)
- renewstr = "1 month";
+ asprintf(&renewstr, "1 month");
if (renew_life)
- renewstr = renew_life;
+ asprintf(&renewstr, "%s", renew_life);
if (renewstr) {
renew = parse_time (renewstr, "s");
if (renew < 0)
errx (1, "unparsable time: %s", renewstr);
-
+ free(renewstr);
krb5_get_init_creds_opt_set_renew_life (opt, renew);
}