mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-12 22:14:29 +02:00
Expose WebPMalloc() in addition to WebPFree()
and use it at various places, including for WebPData. This is an API change! Change-Id: Ic041323a1179c465292a4f981a86c4c34635d243
This commit is contained in:
@ -137,7 +137,7 @@ int GIFReadFrame(GifFileType* const gif, int transparent_index,
|
||||
}
|
||||
dst = sub_image.argb;
|
||||
|
||||
tmp = (uint8_t*)malloc(rect.width * sizeof(*tmp));
|
||||
tmp = (uint8_t*)WebPMalloc(rect.width * sizeof(*tmp));
|
||||
if (tmp == NULL) goto End;
|
||||
|
||||
if (image_desc->Interlace) { // Interlaced image.
|
||||
@ -168,7 +168,7 @@ int GIFReadFrame(GifFileType* const gif, int transparent_index,
|
||||
End:
|
||||
if (!ok) picture->error_code = sub_image.error_code;
|
||||
WebPPictureFree(&sub_image);
|
||||
free(tmp);
|
||||
WebPFree(tmp);
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user