From: Rasmus Lerdorf Date: Fri, 23 Aug 2002 17:53:03 +0000 (+0000) Subject: stream closing bug here too X-Git-Tag: RELEASE_0_91~285 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=53e6c079076414d718052298cde30d3d6e565045;p=php stream closing bug here too --- diff --git a/ext/gd/gd.c b/ext/gd/gd.c index bb8e40645a..a07cc31c94 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -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);