diff options
author | Brad King <brad.king@kitware.com> | 2018-05-18 14:16:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-05-18 14:16:50 (GMT) |
commit | 3e913b819d8d8118d5e8dc3b7289f622e9ca92e5 (patch) | |
tree | 82c19f5ec814c84b986e54e3fc6fa0a83622fd81 /Utilities/cmcurl/lib/vauth/krb5_sspi.c | |
parent | f3c73b878c594d40119e480ca1074e733d7ba1ce (diff) | |
parent | d431136e029c652f5913bcebeaab3b9236b114c4 (diff) | |
download | CMake-3e913b819d8d8118d5e8dc3b7289f622e9ca92e5.zip CMake-3e913b819d8d8118d5e8dc3b7289f622e9ca92e5.tar.gz CMake-3e913b819d8d8118d5e8dc3b7289f622e9ca92e5.tar.bz2 |
Merge branch 'upstream-curl' into update-curl
* upstream-curl:
curl 2018-05-15 (cb013830)
Diffstat (limited to 'Utilities/cmcurl/lib/vauth/krb5_sspi.c')
-rw-r--r-- | Utilities/cmcurl/lib/vauth/krb5_sspi.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Utilities/cmcurl/lib/vauth/krb5_sspi.c b/Utilities/cmcurl/lib/vauth/krb5_sspi.c index 1b4cef4..9afb971 100644 --- a/Utilities/cmcurl/lib/vauth/krb5_sspi.c +++ b/Utilities/cmcurl/lib/vauth/krb5_sspi.c @@ -135,7 +135,7 @@ CURLcode Curl_auth_create_gssapi_user_message(struct Curl_easy *data, } if(!krb5->credentials) { - /* Do we have credientials to use or are we using single sign-on? */ + /* Do we have credentials to use or are we using single sign-on? */ if(userp && *userp) { /* Populate our identity structure */ result = Curl_create_sspi_identity(userp, passwdp, &krb5->identity); @@ -150,12 +150,10 @@ CURLcode Curl_auth_create_gssapi_user_message(struct Curl_easy *data, krb5->p_identity = NULL; /* Allocate our credentials handle */ - krb5->credentials = malloc(sizeof(CredHandle)); + krb5->credentials = calloc(1, sizeof(CredHandle)); if(!krb5->credentials) return CURLE_OUT_OF_MEMORY; - memset(krb5->credentials, 0, sizeof(CredHandle)); - /* Acquire our credentials handle */ status = s_pSecFn->AcquireCredentialsHandle(NULL, (TCHAR *) @@ -167,11 +165,9 @@ CURLcode Curl_auth_create_gssapi_user_message(struct Curl_easy *data, return CURLE_LOGIN_DENIED; /* Allocate our new context handle */ - krb5->context = malloc(sizeof(CtxtHandle)); + krb5->context = calloc(1, sizeof(CtxtHandle)); if(!krb5->context) return CURLE_OUT_OF_MEMORY; - - memset(krb5->context, 0, sizeof(CtxtHandle)); } if(chlg64 && *chlg64) { |