mirror of
https://github.com/php/php-src.git
synced 2024-12-18 06:21:41 +08:00
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:
parent
fcdc0a6db0
commit
e45b613950
@ -1132,9 +1132,7 @@ PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int typ
|
|||||||
if (replace_buffer) {
|
if (replace_buffer) {
|
||||||
zend_string_free(replace_buffer);
|
zend_string_free(replace_buffer);
|
||||||
} else {
|
} else {
|
||||||
if (buffer_len > 0) {
|
efree(buffer);
|
||||||
efree(buffer);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
php_error(type, "%s", message);
|
php_error(type, "%s", message);
|
||||||
|
Loading…
Reference in New Issue
Block a user