mirror of
https://github.com/webmproject/libwebp.git
synced 2025-04-26 18:56:45 +02:00
fix memleak in WebPIDelete()
happens when decoding is partial (past Partition0), without error and interrupted by calling WebPIDelete() WebPIDelete() needs to call VP8ExitCritical() to free in-flight resources Change-Id: Id4faef1b92f7edd8c17d642c58860e70dd570506 (cherry picked from commit 40ae3520b19e9f2ed22d52b7677d846da8da90de)
This commit is contained in:
parent
2a04b034f7
commit
c28544a420
@ -606,6 +606,10 @@ void WebPIDelete(WebPIDecoder* idec) {
|
||||
if (idec == NULL) return;
|
||||
if (idec->dec_ != NULL) {
|
||||
if (!idec->is_lossless_) {
|
||||
if (idec->state_ == STATE_VP8_DATA) {
|
||||
// Synchronize the thread, clean-up and check for errors.
|
||||
VP8ExitCritical(idec->dec_, &idec->io_);
|
||||
}
|
||||
VP8Delete(idec->dec_);
|
||||
} else {
|
||||
VP8LDelete(idec->dec_);
|
||||
|
Loading…
x
Reference in New Issue
Block a user