mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
this string should be freed later since path == free_path
This commit is contained in:
parent
f6238ee664
commit
97c3dbaf56
1 changed files with 2 additions and 2 deletions
|
@ -1476,14 +1476,14 @@ char *phar_fix_filepath(char *path, int *new_len, int use_cwd TSRMLS_DC) /* {{{
|
||||||
ptr = tsrm_strtok_r(NULL, "/", &tok);
|
ptr = tsrm_strtok_r(NULL, "/", &tok);
|
||||||
}
|
}
|
||||||
|
|
||||||
efree(free_path);
|
|
||||||
|
|
||||||
if (path[path_length-1] == '/' && new_phar_len > 1) {
|
if (path[path_length-1] == '/' && new_phar_len > 1) {
|
||||||
new_phar = (char*)erealloc(new_phar, new_phar_len + 2);
|
new_phar = (char*)erealloc(new_phar, new_phar_len + 2);
|
||||||
new_phar[new_phar_len++] = '/';
|
new_phar[new_phar_len++] = '/';
|
||||||
new_phar[new_phar_len] = 0;
|
new_phar[new_phar_len] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
efree(free_path);
|
||||||
|
|
||||||
if (new_phar_len == 0) {
|
if (new_phar_len == 0) {
|
||||||
new_phar = (char *) erealloc(new_phar, new_phar_len+1+1);
|
new_phar = (char *) erealloc(new_phar, new_phar_len+1+1);
|
||||||
new_phar[new_phar_len] = '/';
|
new_phar[new_phar_len] = '/';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue