|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2000, Version 4.0.3-dev
+- Internal opened_path variable now uses the Zend memory manager so that full
+ paths of files won't leak on unclean shutdown (Andi)
- Removed support of print $obj automatically calling the __string_value()
method. Instead define yourself a method such as toString() and use
print $obj->toString() (Andi, Zend Engine)
#endif
}
if (fh->opened_path) {
- free(fh->opened_path);
+ efree(fh->opened_path);
}
if (fh->free_filename && fh->filename) {
efree(fh->filename);
static FILE *zend_fopen_wrapper(const char *filename, char **opened_path)
{
if (opened_path) {
- *opened_path = strdup(filename);
+ *opened_path = estrdup(filename);
}
return fopen(filename, "rb");
}
}
}
if (opened_path) {
- free(opened_path);
+ efree(opened_path);
}
break;
}
if (opened_path) {
zval tmp;
- tmp.value.str.val = opened_path;
+ tmp.value.str.val = strdup(opened_path);
tmp.value.str.len = strlen(opened_path);
tmp.type = IS_STRING;
zend_hash_update(&configuration_hash,"cfg_file_path",sizeof("cfg_file_path"),(void *) &tmp,sizeof(zval),NULL);
#if DEBUG_CFG_PARSER
php_printf("INI file opened at '%s'\n",opened_path);
#endif
+ efree(opened_path);
}
init_cfg_scanner();
memcpy(real_path,new_state.cwd,copy_len);
real_path[copy_len]='\0';
} else {
- real_path = new_state.cwd;
+ real_path = estrndup(new_state.cwd, new_state.cwd_length);
+ free(new_state.cwd);
}
return real_path;