diff options
| author | Dale Stammen <dalestam@microsoft.com> | 2017-01-12 21:25:10 -0800 |
|---|---|---|
| committer | Dale Stammen <dalestam@microsoft.com> | 2017-01-12 21:25:10 -0800 |
| commit | 678721b9a8efc550aee9e5293f1c39a4522428fa (patch) | |
| tree | a7379b204f15b47128a39835d01221440395c54e | |
| parent | 7676b8780db1e1e591c4fc7eba4f96f73c428cb4 (diff) | |
| download | vcpkg-678721b9a8efc550aee9e5293f1c39a4522428fa.tar.gz vcpkg-678721b9a8efc550aee9e5293f1c39a4522428fa.zip | |
added missing free calls after curl_getenv
| -rw-r--r-- | ports/curl/0002_fix_uwp.patch | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/ports/curl/0002_fix_uwp.patch b/ports/curl/0002_fix_uwp.patch index a96f67838..5cd0678cf 100644 --- a/ports/curl/0002_fix_uwp.patch +++ b/ports/curl/0002_fix_uwp.patch @@ -14,7 +14,7 @@ index ed3f38a..d6480b7 100644 endif(WIN32) diff --git a/lib/curl_gethostname.c b/lib/curl_gethostname.c -index 2591fd8..4380b7c 100644 +index 2591fd8..cef38ac 100644 --- a/lib/curl_gethostname.c +++ b/lib/curl_gethostname.c @@ -21,6 +21,7 @@ @@ -25,28 +25,37 @@ index 2591fd8..4380b7c 100644 #include "curl_gethostname.h" -@@ -64,7 +65,7 @@ int Curl_gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen) { +@@ -64,9 +65,10 @@ int Curl_gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen) { #ifdef DEBUGBUILD /* Override host name when environment variable CURL_GETHOSTNAME is set */ - const char *force_hostname = getenv("CURL_GETHOSTNAME"); -+ const char *force_hostname = curl_getenv("CURL_GETHOSTNAME"); ++ char *force_hostname = curl_getenv("CURL_GETHOSTNAME"); if(force_hostname) { strncpy(name, force_hostname, namelen); ++ free(force_hostname); err = 0; + } + else { diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c -index 812a073..3c322ed 100644 +index 812a073..02c8416 100644 --- a/lib/curl_ntlm_core.c +++ b/lib/curl_ntlm_core.c -@@ -696,7 +696,7 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash, +@@ -696,9 +696,12 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash, /* Calculate the timestamp */ #ifdef DEBUGBUILD - char *force_timestamp = getenv("CURL_FORCETIME"); +- if(force_timestamp) + char *force_timestamp = curl_getenv("CURL_FORCETIME"); - if(force_timestamp) ++ if (force_timestamp) ++ { tw = CURL_OFF_T_C(11644473600) * 10000000; ++ free(force_timestamp); ++ } else + #endif + tw = ((curl_off_t)time(NULL) + CURL_OFF_T_C(11644473600)) * 10000000; diff --git a/lib/ftp.c b/lib/ftp.c index b231731..d50779f 100644 --- a/lib/ftp.c @@ -78,7 +87,7 @@ index 7cb0c96..2f43d3c 100644 #include "smb.h" #include "urldata.h" diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c -index 56a8823..4032e7e 100644 +index 56a8823..5a895ed 100644 --- a/lib/vtls/vtls.c +++ b/lib/vtls/vtls.c @@ -197,7 +197,7 @@ unsigned int Curl_rand(struct Curl_easy *data) @@ -90,3 +99,11 @@ index 56a8823..4032e7e 100644 if(force_entropy) { if(!seeded) { size_t elen = strlen(force_entropy); +@@ -208,6 +208,7 @@ unsigned int Curl_rand(struct Curl_easy *data) + } + else + randseed++; ++ free(force_entropy); + return randseed; + } + #endif |
