mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 13:48:21 +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
This commit is contained in:
parent
d9662658d9
commit
40ae3520b1
@ -625,6 +625,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