We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6ded804 commit ffe3e65Copy full SHA for ffe3e65
main/php_open_temporary_file.c
@@ -194,12 +194,12 @@ PHPAPI const char* php_get_temporary_directory(void)
194
#ifdef P_tmpdir
195
/* Use the standard default temporary directory. */
196
if (P_tmpdir) {
197
- temporary_directory = P_tmpdir;
+ temporary_directory = strdup(P_tmpdir);
198
return temporary_directory;
199
}
200
#endif
201
/* Shouldn't ever(!) end up here ... last ditch default. */
202
- temporary_directory = "/tmp";
+ temporary_directory = strdup("/tmp");
203
204
205
0 commit comments