Free buffer in php_verror even if it is empty

vspprintf allocates a buffer even if the resulting string is empty.
This commit is contained in:
Nikita Popov 2019-12-17 16:44:17 +01:00
parent fcdc0a6db0
commit e45b613950

View File

@ -1132,10 +1132,8 @@ PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int typ
if (replace_buffer) {
zend_string_free(replace_buffer);
} else {
if (buffer_len > 0) {
efree(buffer);
}
}
php_error(type, "%s", message);
efree(message);