diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libads/kerberos_verify.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/libads/kerberos_verify.c b/source3/libads/kerberos_verify.c index 378258ee08..ed889d027a 100644 --- a/source3/libads/kerberos_verify.c +++ b/source3/libads/kerberos_verify.c @@ -274,6 +274,7 @@ static krb5_error_code ads_secrets_verify_ticket(krb5_context context, auth_ok = True; krb5_copy_keyblock(context, key, keyblock); krb5_free_keyblock(context, key); + SAFE_FREE(key); break; } @@ -285,10 +286,12 @@ static krb5_error_code ads_secrets_verify_ticket(krb5_context context, if (ret == KRB5KRB_AP_ERR_TKT_NYV || ret == KRB5KRB_AP_ERR_TKT_EXPIRED || ret == KRB5KRB_AP_ERR_SKEW) { + SAFE_FREE(key); break; } krb5_free_keyblock(context, key); + SAFE_FREE(key); } |