mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 05:38:22 +01: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 40ae3520b1
)
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…
Reference in New Issue
Block a user