summaryrefslogtreecommitdiff
path: root/ext/exif/exif.c
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2002-03-16 21:19:17 +0000
committerMarcus Boerger <helly@php.net>2002-03-16 21:19:17 +0000
commitbcad7a593ab71a1c2ab5e2923fb2b853b8e257cc (patch)
tree02b1acd513a586add5c0ca0eaa5eaa26f9ce0370 /ext/exif/exif.c
parentd50102b6ab4289baece997c7ac4f4fa621d4a186 (diff)
downloadphp-git-bcad7a593ab71a1c2ab5e2923fb2b853b8e257cc.tar.gz
-quick hack to bug in streams....but where?
Diffstat (limited to 'ext/exif/exif.c')
-rw-r--r--ext/exif/exif.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/exif/exif.c b/ext/exif/exif.c
index 2d58f7a222..11e194ef62 100644
--- a/ext/exif/exif.c
+++ b/ext/exif/exif.c
@@ -92,7 +92,7 @@ typedef unsigned char uchar;
#define auto_fseek(f,o,w) php_stream_seek(f,o,w)
#define auto_fread(b,s,n,f) php_stream_read(f,b,(s)*(n))
#define auto_fgetc(f) php_stream_getc(f)
-#define auto_fclose(f) php_stream_close(f)
+#define auto_fclose(f) php_stream_free(f,0)
#else
#define auto_ftell(f) ftell(f)
#define auto_fseek(f,o,w) fseek(f,o,w)
@@ -2988,10 +2988,11 @@ int exif_read_file(image_info_type *ImageInfo, char *FileName, int read_thumbnai
mem_stream = php_memory_stream_create();
org_stream = ImageInfo->infile;
ImageInfo->FileSize = php_stream_copy_to_stream(org_stream, mem_stream, PHP_STREAM_COPY_ALL);
- //auto_fclose(org_stream);
+ org_stream->wrapper->destroy = NULL;
+ auto_fclose(org_stream);
ImageInfo->infile = mem_stream;
#ifdef EXIF_DEBUG
- php_error(E_NOTICE,"stream is not stdio: copy done");
+ php_error(E_NOTICE,"stream is not stdio: copy %d done", ImageInfo->FileSize);
#endif
}
#else