aboutsummaryrefslogtreecommitdiff
path: root/lib/curl_sasl_sspi.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/curl_sasl_sspi.c')
-rw-r--r--lib/curl_sasl_sspi.c84
1 files changed, 42 insertions, 42 deletions
diff --git a/lib/curl_sasl_sspi.c b/lib/curl_sasl_sspi.c
index 546c2c8bd..238d74b7e 100644
--- a/lib/curl_sasl_sspi.c
+++ b/lib/curl_sasl_sspi.c
@@ -78,7 +78,7 @@ TCHAR *Curl_sasl_build_spn(const char *service, const char *host)
/* Allocate our TCHAR based SPN */
tchar_spn = Curl_convert_UTF8_to_tchar(utf8_spn);
if(!tchar_spn) {
- Curl_safefree(utf8_spn);
+ free(utf8_spn);
return NULL;
}
@@ -154,7 +154,7 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data,
status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_DIGEST),
&SecurityPackage);
if(status != SEC_E_OK) {
- Curl_safefree(input_token);
+ free(input_token);
return CURLE_NOT_BUILT_IN;
}
@@ -167,7 +167,7 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data,
/* Allocate our response buffer */
output_token = malloc(token_max);
if(!output_token) {
- Curl_safefree(input_token);
+ free(input_token);
return CURLE_OUT_OF_MEMORY;
}
@@ -175,8 +175,8 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data,
/* Generate our SPN */
spn = Curl_sasl_build_spn(service, data->easy_conn->host.name);
if(!spn) {
- Curl_safefree(output_token);
- Curl_safefree(input_token);
+ free(output_token);
+ free(input_token);
return CURLE_OUT_OF_MEMORY;
}
@@ -185,9 +185,9 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data,
/* Populate our identity structure */
result = Curl_create_sspi_identity(userp, passwdp, &identity);
if(result) {
- Curl_safefree(spn);
- Curl_safefree(output_token);
- Curl_safefree(input_token);
+ free(spn);
+ free(output_token);
+ free(input_token);
return result;
}
@@ -208,9 +208,9 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data,
if(status != SEC_E_OK) {
Curl_sspi_free_identity(p_identity);
- Curl_safefree(spn);
- Curl_safefree(output_token);
- Curl_safefree(input_token);
+ free(spn);
+ free(output_token);
+ free(input_token);
return CURLE_LOGIN_DENIED;
}
@@ -243,9 +243,9 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data,
else if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) {
s_pSecFn->FreeCredentialsHandle(&credentials);
Curl_sspi_free_identity(p_identity);
- Curl_safefree(spn);
- Curl_safefree(output_token);
- Curl_safefree(input_token);
+ free(spn);
+ free(output_token);
+ free(input_token);
return CURLE_RECV_ERROR;
}
@@ -262,13 +262,13 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data,
Curl_sspi_free_identity(p_identity);
/* Free the SPN */
- Curl_safefree(spn);
+ free(spn);
/* Free the response buffer */
- Curl_safefree(output_token);
+ free(output_token);
/* Free the decoded challenge message */
- Curl_safefree(input_token);
+ free(input_token);
return result;
}
@@ -388,7 +388,7 @@ CURLcode Curl_sasl_create_digest_http_message(struct SessionHandle *data,
p_identity, NULL, NULL,
&credentials, &expiry);
if(status != SEC_E_OK) {
- Curl_safefree(output_token);
+ free(output_token);
return CURLE_LOGIN_DENIED;
}
@@ -428,7 +428,7 @@ CURLcode Curl_sasl_create_digest_http_message(struct SessionHandle *data,
else if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) {
s_pSecFn->FreeCredentialsHandle(&credentials);
- Curl_safefree(output_token);
+ free(output_token);
return CURLE_OUT_OF_MEMORY;
}
@@ -438,7 +438,7 @@ CURLcode Curl_sasl_create_digest_http_message(struct SessionHandle *data,
s_pSecFn->DeleteSecurityContext(&context);
s_pSecFn->FreeCredentialsHandle(&credentials);
- Curl_safefree(output_token);
+ free(output_token);
return CURLE_OUT_OF_MEMORY;
}
@@ -459,7 +459,7 @@ CURLcode Curl_sasl_create_digest_http_message(struct SessionHandle *data,
Curl_sspi_free_identity(p_identity);
/* Free the response buffer */
- Curl_safefree(output_token);
+ free(output_token);
return CURLE_OK;
}
@@ -910,7 +910,7 @@ CURLcode Curl_sasl_create_gssapi_user_message(struct SessionHandle *data,
&expiry);
if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) {
- Curl_safefree(chlg);
+ free(chlg);
return CURLE_RECV_ERROR;
}
@@ -928,7 +928,7 @@ CURLcode Curl_sasl_create_gssapi_user_message(struct SessionHandle *data,
}
/* Free the decoded challenge */
- Curl_safefree(chlg);
+ free(chlg);
return result;
}
@@ -999,7 +999,7 @@ CURLcode Curl_sasl_create_gssapi_security_message(struct SessionHandle *data,
SECPKG_ATTR_SIZES,
&sizes);
if(status != SEC_E_OK) {
- Curl_safefree(chlg);
+ free(chlg);
return CURLE_OUT_OF_MEMORY;
}
@@ -1009,7 +1009,7 @@ CURLcode Curl_sasl_create_gssapi_security_message(struct SessionHandle *data,
SECPKG_CRED_ATTR_NAMES,
&names);
if(status != SEC_E_OK) {
- Curl_safefree(chlg);
+ free(chlg);
return CURLE_RECV_ERROR;
}
@@ -1030,7 +1030,7 @@ CURLcode Curl_sasl_create_gssapi_security_message(struct SessionHandle *data,
if(status != SEC_E_OK) {
infof(data, "GSSAPI handshake failure (empty security message)\n");
- Curl_safefree(chlg);
+ free(chlg);
return CURLE_BAD_CONTENT_ENCODING;
}
@@ -1039,7 +1039,7 @@ CURLcode Curl_sasl_create_gssapi_security_message(struct SessionHandle *data,
if(input_buf[1].cbBuffer != 4) {
infof(data, "GSSAPI handshake failure (invalid security data)\n");
- Curl_safefree(chlg);
+ free(chlg);
return CURLE_BAD_CONTENT_ENCODING;
}
@@ -1047,7 +1047,7 @@ CURLcode Curl_sasl_create_gssapi_security_message(struct SessionHandle *data,
/* Copy the data out and free the challenge as it is not required anymore */
memcpy(&indata, input_buf[1].pvBuffer, 4);
s_pSecFn->FreeContextBuffer(input_buf[1].pvBuffer);
- Curl_safefree(chlg);
+ free(chlg);
/* Extract the security layer */
sec_layer = indata & 0x000000FF;
@@ -1074,7 +1074,7 @@ CURLcode Curl_sasl_create_gssapi_security_message(struct SessionHandle *data,
/* Convert the user name to UTF8 when operating with Unicode */
user_name = Curl_convert_tchar_to_UTF8(names.sUserName);
if(!user_name) {
- Curl_safefree(trailer);
+ free(trailer);
return CURLE_OUT_OF_MEMORY;
}
@@ -1083,7 +1083,7 @@ CURLcode Curl_sasl_create_gssapi_security_message(struct SessionHandle *data,
messagelen = sizeof(outdata) + strlen(user_name) + 1;
message = malloc(messagelen);
if(!message) {
- Curl_safefree(trailer);
+ free(trailer);
Curl_unicodefree(user_name);
return CURLE_OUT_OF_MEMORY;
@@ -1102,8 +1102,8 @@ CURLcode Curl_sasl_create_gssapi_security_message(struct SessionHandle *data,
/* Allocate the padding */
padding = malloc(sizes.cbBlockSize);
if(!padding) {
- Curl_safefree(message);
- Curl_safefree(trailer);
+ free(message);
+ free(trailer);
return CURLE_OUT_OF_MEMORY;
}
@@ -1126,9 +1126,9 @@ CURLcode Curl_sasl_create_gssapi_security_message(struct SessionHandle *data,
status = s_pSecFn->EncryptMessage(krb5->context, KERB_WRAP_NO_ENCRYPT,
&wrap_desc, 0);
if(status != SEC_E_OK) {
- Curl_safefree(padding);
- Curl_safefree(message);
- Curl_safefree(trailer);
+ free(padding);
+ free(message);
+ free(trailer);
return CURLE_OUT_OF_MEMORY;
}
@@ -1138,9 +1138,9 @@ CURLcode Curl_sasl_create_gssapi_security_message(struct SessionHandle *data,
wrap_buf[2].cbBuffer;
appdata = malloc(appdatalen);
if(!appdata) {
- Curl_safefree(padding);
- Curl_safefree(message);
- Curl_safefree(trailer);
+ free(padding);
+ free(message);
+ free(trailer);
return CURLE_OUT_OF_MEMORY;
}
@@ -1157,10 +1157,10 @@ CURLcode Curl_sasl_create_gssapi_security_message(struct SessionHandle *data,
outlen);
/* Free all of our local buffers */
- Curl_safefree(appdata);
- Curl_safefree(padding);
- Curl_safefree(message);
- Curl_safefree(trailer);
+ free(appdata);
+ free(padding);
+ free(message);
+ free(trailer);
return result;
}