summaryrefslogtreecommitdiff
path: root/main/fopen_wrappers.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/fopen_wrappers.c')
-rw-r--r--main/fopen_wrappers.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c
index 9b8645a061..6722798598 100644
--- a/main/fopen_wrappers.c
+++ b/main/fopen_wrappers.c
@@ -475,7 +475,7 @@ PHPAPI char *php_resolve_path(const char *filename, int filename_length, const c
char resolved_path[MAXPATHLEN];
char trypath[MAXPATHLEN];
const char *ptr, *end, *p;
- char *actual_path;
+ const char *actual_path;
php_stream_wrapper *wrapper;
if (!filename || CHECK_NULL_PATH(filename, filename_length)) {
@@ -791,11 +791,11 @@ PHPAPI char *expand_filepath_with_mode(const char *filepath, char *real_path, co
}
}
- new_state.cwd = strdup(cwd);
+ new_state.cwd = estrdup(cwd);
new_state.cwd_length = strlen(cwd);
if (virtual_file_ex(&new_state, filepath, NULL, realpath_mode TSRMLS_CC)) {
- free(new_state.cwd);
+ efree(new_state.cwd);
return NULL;
}
@@ -806,7 +806,7 @@ PHPAPI char *expand_filepath_with_mode(const char *filepath, char *real_path, co
} else {
real_path = estrndup(new_state.cwd, new_state.cwd_length);
}
- free(new_state.cwd);
+ efree(new_state.cwd);
return real_path;
}