Skip to content

Commit 00d0ecd

Browse files
author
Ilia Alshanetsky
committed
Revert patch
1 parent e67b407 commit 00d0ecd

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

main/php_open_temporary_file.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -200,14 +200,7 @@ PHPAPI const char* php_get_temporary_directory(void)
200200
{
201201
char* s = getenv("TMPDIR");
202202
if (s) {
203-
int len = strlen(s);
204-
205-
if (s[len - 1] == DEFAULT_SLASH) {
206-
temporary_directory = zend_strndup(s, len - 1);
207-
} else {
208-
temporary_directory = zend_strndup(s, len);
209-
}
210-
203+
temporary_directory = strdup(s);
211204
return temporary_directory;
212205
}
213206
}

0 commit comments

Comments
 (0)