mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
fixed a memleak.
This commit is contained in:
parent
faaeee3705
commit
a9f850f34e
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user