We can't always efree here
php_escape_html_entities can return an interned_empty_string
This commit is contained in:
Rasmus Lerdorf 2015-02-22 08:14:41 -08:00
parent 8f6a013c97
commit a9ba407ce1

View File

@ -1087,7 +1087,7 @@ static void php_error_cb(int type, const char *error_filename, const uint error_
size_t len;
char *buf = php_escape_html_entities(buffer, buffer_len, &len, 0, ENT_COMPAT, NULL TSRMLS_CC);
php_printf("%s<br />\n<b>%s</b>: %s in <b>%s</b> on line <b>%d</b><br />\n%s", STR_PRINT(prepend_string), error_type_str, buf, error_filename, error_lineno, STR_PRINT(append_string));
efree(buf);
str_efree(buf);
} else {
php_printf("%s<br />\n<b>%s</b>: %s in <b>%s</b> on line <b>%d</b><br />\n%s", STR_PRINT(prepend_string), error_type_str, buffer, error_filename, error_lineno, STR_PRINT(append_string));
}