diff options
| author | foobar <sniper@php.net> | 2001-08-04 03:06:12 +0000 |
|---|---|---|
| committer | foobar <sniper@php.net> | 2001-08-04 03:06:12 +0000 |
| commit | a9f850f34e8089a96dc6c0f8714133a6d5d03a78 (patch) | |
| tree | 6ad30eea502155c1cdbe2fdcde0c50f94c486459 | |
| parent | faaeee3705df5133568905d6be85494dae4de424 (diff) | |
| download | php-git-a9f850f34e8089a96dc6c0f8714133a6d5d03a78.tar.gz | |
fixed a memleak.
| -rw-r--r-- | ext/exif/exif.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |
