Demux: Fix a potential memleak

Change-Id: Ic0dcac010da088b791c130be4abacdd8c31e92cf
(cherry picked from commit 94328d6457)
This commit is contained in:
Urvang Joshi 2013-04-16 14:13:45 -07:00 committed by James Zern
parent c7b92184df
commit 11edf5e24b

View File

@ -317,6 +317,7 @@ static ParseStatus ParseAnimationFrame(
frame->duration_ = ReadLE24s(mem);
frame->dispose_method_ = (WebPMuxAnimDispose)(ReadByte(mem) & 1);
if (frame->width_ * (uint64_t)frame->height_ >= MAX_IMAGE_AREA) {
free(frame);
return PARSE_ERROR;
}