Skip to content

Commit

Permalink
use strdup()
Browse files Browse the repository at this point in the history
  • Loading branch information
tony2001 committed Feb 6, 2007
1 parent 2052cf5 commit 5a6d0f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main/php_open_temporary_file.c
Expand Up @@ -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
}
Expand Down

0 comments on commit 5a6d0f0

Please sign in to comment.