krb5_creds **out_creds;
{
krb5_error_code code;
- krb5_creds in_creds, evidence_creds;
+ krb5_creds in_creds, evidence_creds, *result_creds = NULL;
krb5_flags flags = 0;
krb5_principal cc_princ = NULL;
+ *out_creds = NULL;
+
k5_mutex_assert_locked(&cred->lock);
memset(&in_creds, 0, sizeof(krb5_creds));
memset(&evidence_creds, 0, sizeof(krb5_creds));
}
code = krb5_get_credentials(context, flags, cred->ccache,
- &in_creds, out_creds);
+ &in_creds, &result_creds);
if (code)
goto cleanup;
goto cleanup;
}
+ *out_creds = result_creds;
+ result_creds = NULL;
+
cleanup:
krb5_free_authdata(context, in_creds.authdata);
krb5_free_principal(context, cc_princ);
krb5_free_cred_contents(context, &evidence_creds);
+ krb5_free_creds(context, result_creds);
return code;
}