diff options
author | Wez Furlong <wez@php.net> | 2002-08-23 17:45:46 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2002-08-23 17:45:46 +0000 |
commit | 533c16e21e5a43d0e2029b259cdb9c6e4270bdfb (patch) | |
tree | 8ad5b5ee4d70c54f465550e32bee70b393f33f4f | |
parent | 2a71d7d5bb7f58bf0bf6cc5e56d61ad4469aead5 (diff) | |
download | php-git-533c16e21e5a43d0e2029b259cdb9c6e4270bdfb.tar.gz |
Fix segfault reported by Rasmus.
-rw-r--r-- | ext/gd/gd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/gd/gd.c b/ext/gd/gd.c index cb602053fb..bb8e40645a 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -514,13 +514,13 @@ PHP_FUNCTION(imageloadfont) while (b < hdr_size && (n = php_stream_read(stream, (char*)&font[b], hdr_size - b))) b += n; if (!n) { - php_stream_close(stream); efree(font); if (php_stream_eof(stream)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "End of file while reading header"); } else { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error while reading header"); } + php_stream_close(stream); RETURN_FALSE; } i = php_stream_tell(stream); |