diff options
author | Daniel Stenberg <daniel@haxx.se> | 2015-03-16 15:01:15 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2015-03-16 15:01:15 +0100 |
commit | 0f4a03cbb6fdb84d05cb6aafe50444edad4f4119 (patch) | |
tree | 89472eece4173a97ac3b80aba5e35ed70cdd7845 /lib/curl_ntlm_core.c | |
parent | 9e661601feba03d1158ac466a457d5a6ce7f3f11 (diff) |
free: instead of Curl_safefree()
Since we just started make use of free(NULL) in order to simplify code,
this change takes it a step further and:
- converts lots of Curl_safefree() calls to good old free()
- makes Curl_safefree() not check the pointer before free()
The (new) rule of thumb is: if you really want a function call that
frees a pointer and then assigns it to NULL, then use Curl_safefree().
But we will prefer just using free() from now on.
Diffstat (limited to 'lib/curl_ntlm_core.c')
-rw-r--r-- | lib/curl_ntlm_core.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c index 5b88fc5a0..a77f42da0 100644 --- a/lib/curl_ntlm_core.c +++ b/lib/curl_ntlm_core.c @@ -618,7 +618,7 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_hash(const char *user, size_t userlen, result = Curl_hmac_md5(ntlmhash, 16, identity, curlx_uztoui(identity_len), ntlmv2hash); - Curl_safefree(identity); + free(identity); return result; } @@ -705,8 +705,7 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash, result = Curl_hmac_md5(ntlmv2hash, NTLM_HMAC_MD5_LEN, ptr + 8, NTLMv2_BLOB_LEN + 8, hmac_output); if(result) { - Curl_safefree(ptr); - + free(ptr); return result; } |