summaryrefslogtreecommitdiff
path: root/ext/exif/exif.c
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2002-03-20 14:21:30 +0000
committerWez Furlong <wez@php.net>2002-03-20 14:21:30 +0000
commit659a071e3df2f16cd21083d1dec8c19e199f7757 (patch)
tree893304b46b1d9c5f937dbbd84cf1a4b9f38f13ce /ext/exif/exif.c
parent14d62c7b624cdcec1006c7d164bfb12b10ae18e5 (diff)
downloadphp-git-659a071e3df2f16cd21083d1dec8c19e199f7757.tar.gz
Streams are all tracked as resources now.
Add some logic that will help track down leaks when debug is enabled.
Diffstat (limited to 'ext/exif/exif.c')
-rw-r--r--ext/exif/exif.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/ext/exif/exif.c b/ext/exif/exif.c
index 7fdf6c9f87..86aab27497 100644
--- a/ext/exif/exif.c
+++ b/ext/exif/exif.c
@@ -3254,7 +3254,6 @@ PHP_FUNCTION(exif_imagetype)
{
zval **arg1;
php_stream * stream;
- int rsrc_id;
int itype = 0;
if (ZEND_NUM_ARGS() != 1)
@@ -3269,11 +3268,9 @@ PHP_FUNCTION(exif_imagetype)
RETURN_FALSE;
}
- rsrc_id = ZEND_REGISTER_RESOURCE(NULL, stream, php_file_le_stream());
-
itype = itype = php_getimagetype(stream, NULL TSRMLS_CC);
- zend_list_delete(rsrc_id);
+ php_stream_close(stream);
if ( itype == IMAGE_FILETYPE_UNKNOWN) {
RETURN_FALSE;