summaryrefslogtreecommitdiff
path: root/main/SAPI.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2017-11-28 20:31:48 +0100
committerAnatol Belski <ab@php.net>2017-11-28 20:33:11 +0100
commit8b57a5bca0c5a9ba064aa27e7614d1a11c0cac6d (patch)
treea4d92839ba3f7058390d7c0636eff3c00d022af3 /main/SAPI.c
parent2873316d1de9e82c5320bd363a5bf60ef3f25370 (diff)
downloadphp-git-8b57a5bca0c5a9ba064aa27e7614d1a11c0cac6d.tar.gz
Follow up on bug #75574 for FCGI side
Diffstat (limited to 'main/SAPI.c')
-rw-r--r--main/SAPI.c6
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;
}