aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/support/env_windows.cc
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-10-10 22:13:40 -0700
committerGravatar Craig Tiller <ctiller@google.com>2017-10-10 22:13:40 -0700
commit0a64225aab8b8b66890839cd04655ca96f86d59a (patch)
treedfa2b18bd1bebf4273098b71b2bfcba43aea7e88 /src/core/lib/support/env_windows.cc
parent131a25bc2d71b9c05138454db2281c2b968f159d (diff)
parentf78728a79a513332f0035cc12865eb5967d9537e (diff)
Merge branch 'chttp2_timer' into timer
Diffstat (limited to 'src/core/lib/support/env_windows.cc')
-rw-r--r--src/core/lib/support/env_windows.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/lib/support/env_windows.cc b/src/core/lib/support/env_windows.cc
index 73c643c560..c5a25dc201 100644
--- a/src/core/lib/support/env_windows.cc
+++ b/src/core/lib/support/env_windows.cc
@@ -43,7 +43,10 @@ char *gpr_getenv(const char *name) {
DWORD ret;
ret = GetEnvironmentVariable(tname, NULL, 0);
- if (ret == 0) return NULL;
+ if (ret == 0) {
+ gpr_free(tname);
+ return NULL;
+ }
size = ret * (DWORD)sizeof(TCHAR);
tresult = (LPTSTR)gpr_malloc(size);
ret = GetEnvironmentVariable(tname, tresult, size);