Browse Source

avoid xcache.coveragedump_directory ending with \0 in phpinfo

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@524 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 14 years ago
parent
commit
06ebc1952c
  1. 3
      coverager.c

3
coverager.c

@ -469,6 +469,7 @@ int xc_coverager_init(int module_number TSRMLS_DC) /* {{{ */
zend_compile_file = xc_compile_file_for_coverage;
if (cfg_get_string("xcache.coveragedump_directory", &xc_coveragedump_dir) == SUCCESS && xc_coveragedump_dir) {
xc_coveragedump_dir = pestrdup(xc_coveragedump_dir, 1);
int len = strlen(xc_coveragedump_dir);
if (len) {
if (xc_coveragedump_dir[len - 1] == '/') {
@ -476,6 +477,7 @@ int xc_coverager_init(int module_number TSRMLS_DC) /* {{{ */
}
}
if (!strlen(xc_coveragedump_dir)) {
pefree(xc_coveragedump_dir, 1);
xc_coveragedump_dir = NULL;
}
}
@ -489,6 +491,7 @@ void xc_coverager_destroy() /* {{{ */
zend_compile_file = old_compile_file;
}
if (xc_coveragedump_dir) {
pefree(xc_coveragedump_dir, 1);
xc_coveragedump_dir = NULL;
}
}

Loading…
Cancel
Save