summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2007-02-07 21:07:31 +0000
committerAntony Dovgal <tony2001@php.net>2007-02-07 21:07:31 +0000
commitffe3e65ac0a720689b23fdfc5f3bf8fc38265cfc (patch)
treeeda40e7de442dc7c303861993331caa383845dd9 /main
parent6ded8042b9c02d4f113866b76df3a8569d31a10a (diff)
downloadphp-git-ffe3e65ac0a720689b23fdfc5f3bf8fc38265cfc.tar.gz
fix MFHed segfault
Diffstat (limited to 'main')
-rw-r--r--main/php_open_temporary_file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/php_open_temporary_file.c b/main/php_open_temporary_file.c
index c59d8e6407..c7f78ac7c2 100644
--- a/main/php_open_temporary_file.c
+++ b/main/php_open_temporary_file.c
@@ -194,12 +194,12 @@ PHPAPI const char* php_get_temporary_directory(void)
#ifdef P_tmpdir
/* Use the standard default temporary directory. */
if (P_tmpdir) {
- temporary_directory = P_tmpdir;
+ temporary_directory = strdup(P_tmpdir);
return temporary_directory;
}
#endif
/* Shouldn't ever(!) end up here ... last ditch default. */
- temporary_directory = "/tmp";
+ temporary_directory = strdup("/tmp");
return temporary_directory;
#endif
}