diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-12-17 16:44:17 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-12-17 16:46:52 +0100 |
commit | e45b613950d17b9a3d510dcc9a39c32117ecc081 (patch) | |
tree | 579401fda5a14f6cfa035d21a5cecaee5153402b /main/main.c | |
parent | fcdc0a6db0ae63fbed9e3828137b899b844623ce (diff) | |
download | php-git-e45b613950d17b9a3d510dcc9a39c32117ecc081.tar.gz |
Free buffer in php_verror even if it is empty
vspprintf allocates a buffer even if the resulting string is empty.
Diffstat (limited to 'main/main.c')
-rw-r--r-- | main/main.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/main/main.c b/main/main.c index 7890b2ebeb..e1491db1fd 100644 --- a/main/main.c +++ b/main/main.c @@ -1132,9 +1132,7 @@ 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); - } + efree(buffer); } php_error(type, "%s", message); |