krb5: get_cred: Add missing enc retval check

This commit is contained in:
Nicolas Williams
2022-01-17 10:53:13 -06:00
parent c3643bb607
commit cf37c99222

View File

@@ -114,19 +114,20 @@ set_auth_data (krb5_context context,
req_body->enc_authorization_data = NULL; req_body->enc_authorization_data = NULL;
return ret; return ret;
} }
krb5_encrypt_EncryptedData(context, ret = krb5_encrypt_EncryptedData(context,
crypto, crypto,
KRB5_KU_TGS_REQ_AUTH_DAT_SUBKEY, KRB5_KU_TGS_REQ_AUTH_DAT_SUBKEY,
buf, buf,
len, len,
0, 0,
req_body->enc_authorization_data); req_body->enc_authorization_data);
free (buf); free (buf);
krb5_crypto_destroy(context, crypto); krb5_crypto_destroy(context, crypto);
return ret;
} else { } else {
req_body->enc_authorization_data = NULL; req_body->enc_authorization_data = NULL;
return 0;
} }
return 0;
} }
/* /*