mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-16 22:09:57 +02:00
mux: plug some memory leaks on error
Make sure chunk->data and wpi are not leaked by MuxAddFrameTileInternal() in case of MEMORY_ERROR in ChunkSetNth(). Change-Id: Ie20e84b92f4bdcb7c3b94520f36b20dd2e730545
This commit is contained in:
@ -153,6 +153,9 @@ WebPMuxError ChunkAssignDataImageInfo(WebPChunk* chunk, const uint8_t* data,
|
||||
WebPMuxError ChunkSetNth(const WebPChunk* chunk, WebPChunk** chunk_list,
|
||||
uint32_t nth);
|
||||
|
||||
// Releases chunk and returns chunk->next_.
|
||||
WebPChunk* ChunkRelease(WebPChunk* const chunk);
|
||||
|
||||
// Deletes given chunk & returns chunk->next_.
|
||||
WebPChunk* ChunkDelete(WebPChunk* const chunk);
|
||||
|
||||
@ -174,6 +177,9 @@ uint8_t* ChunkListEmit(const WebPChunk* chunk_list, uint8_t* dst);
|
||||
// Initialize.
|
||||
void MuxImageInit(WebPMuxImage* const wpi);
|
||||
|
||||
// Releases image 'wpi' and returns wpi->next.
|
||||
WebPMuxImage* MuxImageRelease(WebPMuxImage* const wpi);
|
||||
|
||||
// Delete image 'wpi' and return the next image in the list or NULL.
|
||||
// 'wpi' can be NULL.
|
||||
WebPMuxImage* MuxImageDelete(WebPMuxImage* const wpi);
|
||||
|
Reference in New Issue
Block a user