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

index 8903d4935f2b871d87880faeda0135c2eec694d4..ec9518cd86f21cbd063c3510359b24119dff84b6 100644 (file)
@@ -648,6 +648,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;
        }