diff options
author | Anatol Belski <ab@php.net> | 2017-11-28 20:31:48 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2017-11-28 20:33:11 +0100 |
commit | 8b57a5bca0c5a9ba064aa27e7614d1a11c0cac6d (patch) | |
tree | a4d92839ba3f7058390d7c0636eff3c00d022af3 /main/SAPI.c | |
parent | 2873316d1de9e82c5320bd363a5bf60ef3f25370 (diff) | |
download | php-git-8b57a5bca0c5a9ba064aa27e7614d1a11c0cac6d.tar.gz |
Follow up on bug #75574 for FCGI side
Diffstat (limited to 'main/SAPI.c')
-rw-r--r-- | main/SAPI.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/main/SAPI.c b/main/SAPI.c index 2a064bce48..c7a46e9cda 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -1027,6 +1027,12 @@ SAPI_API char *sapi_getenv(char *name, size_t name_len) char *value, *tmp = sapi_module.getenv(name, name_len); if (tmp) { value = estrdup(tmp); +#ifdef PHP_WIN32 + if (strlen(sapi_module.name) == sizeof("cgi-fcgi") - 1 && !strcmp(sapi_module.name, "cgi-fcgi")) { + /* XXX more modules to go, if needed. */ + free(tmp); + } +#endif } else { return NULL; } |