]> granicus.if.org Git - php/commitdiff
Fixed stream leak on error.
authorIlia Alshanetsky <iliaa@php.net>
Thu, 20 May 2004 23:37:59 +0000 (23:37 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 20 May 2004 23:37:59 +0000 (23:37 +0000)
ext/gd/gd.c

index 135b548f6b5311996de96efe528521c211df54cc..9627d2cdf393c7508c66fa07acb5e789abe45865 100644 (file)
@@ -737,6 +737,7 @@ PHP_FUNCTION(imageloadfont)
        if (body_size != body_size_check) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error reading font");
                efree(font);
+               php_stream_close(stream);
                RETURN_FALSE;
        }