diff options
-rw-r--r-- | source3/libsmb/clikrb5.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c index 078706d1db..0180bef47a 100644 --- a/source3/libsmb/clikrb5.c +++ b/source3/libsmb/clikrb5.c @@ -1223,7 +1223,11 @@ out: } } else { /* build tgt service by default */ - client_realm = krb5_princ_realm(context, client); + client_realm = krb5_princ_realm(context, creds_in.client); + if (!client_realm) { + ret = ENOMEM; + goto done; + } ret = krb5_make_principal(context, &creds_in.server, *client_realm, KRB5_TGS_NAME, *client_realm, NULL); if (ret) { goto done; |