From a9f850f34e8089a96dc6c0f8714133a6d5d03a78 Mon Sep 17 00:00:00 2001 From: foobar Date: Sat, 4 Aug 2001 03:06:12 +0000 Subject: [PATCH] fixed a memleak. --- ext/exif/exif.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/exif/exif.c b/ext/exif/exif.c index 4469e43d70..7abb061cf6 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -934,7 +934,7 @@ static int scan_JPEG_header (ImageInfoType *ImageInfo, FILE *infile, Section_t * fseek(infile, cp, SEEK_SET); size = ep-cp; - Data = (uchar *)malloc(size); + Data = (uchar *)emalloc(size); if (Data == NULL) { php_error(E_WARNING,"could not allocate data for entire image"); return FALSE; @@ -953,6 +953,7 @@ static int scan_JPEG_header (ImageInfoType *ImageInfo, FILE *infile, Section_t * /* *HaveAll = 1; */ + efree(Data); } return TRUE; -- 2.50.1