From: foobar Date: Sat, 4 Aug 2001 03:06:12 +0000 (+0000) Subject: fixed a memleak. X-Git-Tag: PRE_ENGINE2_SPLIT~82 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a9f850f34e8089a96dc6c0f8714133a6d5d03a78;p=php fixed a memleak. --- 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;