mirror of
https://github.com/php/php-src.git
synced 2024-11-28 04:14:26 +08:00
stream closing bug here too
This commit is contained in:
parent
533c16e21e
commit
53e6c07907
@ -545,7 +545,6 @@ PHP_FUNCTION(imageloadfont)
|
||||
while (b < body_size && (n = php_stream_read(stream, &font->data[b], body_size - b)))
|
||||
b += n;
|
||||
if (!n) {
|
||||
php_stream_close(stream);
|
||||
efree(font->data);
|
||||
efree(font);
|
||||
if (php_stream_eof(stream)) {
|
||||
@ -553,6 +552,7 @@ PHP_FUNCTION(imageloadfont)
|
||||
} else {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error while reading body");
|
||||
}
|
||||
php_stream_close(stream);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
php_stream_close(stream);
|
||||
|
Loading…
Reference in New Issue
Block a user