diff options
author | 2017-10-10 22:13:10 -0700 | |
---|---|---|
committer | 2017-10-10 22:13:10 -0700 | |
commit | f78728a79a513332f0035cc12865eb5967d9537e (patch) | |
tree | 5fb4440086bad7d19ad8d33c9e91afb5151a63be /src/core/lib/support | |
parent | b365adbe0835115ab64fb39770a637e06ff95b2e (diff) | |
parent | 441a14fd43f6033714a5022667e1591967947bb5 (diff) |
Merge github.com:grpc/grpc into chttp2_timer
Diffstat (limited to 'src/core/lib/support')
-rw-r--r-- | src/core/lib/support/env_windows.cc | 5 |
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); |