Follow up on bug #75574 for FCGI side

This commit is contained in:
Anatol Belski 2017-11-28 20:31:48 +01:00
parent 2873316d1d
commit 8b57a5bca0
3 changed files with 83 additions and 0 deletions

View file

@ -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;
}