From 5a6d0f0424f25775830a7c5ee2aeee19962559ea Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Tue, 6 Feb 2007 17:35:42 +0000 Subject: [PATCH] use strdup() --- main/php_open_temporary_file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/php_open_temporary_file.c b/main/php_open_temporary_file.c index c59d8e6407777..c7f78ac7c2a18 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 }