WebPMuxCreate: fix unchecked malloc

Change-Id: Ic824cdfbede4abe8e5106904dd17d564bb1b32d4
This commit is contained in:
James Zern
2012-01-13 20:16:52 -08:00
parent eb425586e1
commit 7e4371c5b3
3 changed files with 4 additions and 1 deletions

View File

@@ -345,6 +345,7 @@ WebPMuxError MuxImageSetNth(const WebPMuxImage* wpi, WebPMuxImage** wpi_list,
// MuxImage deletion methods.
WebPMuxImage* MuxImageDelete(WebPMuxImage* const wpi) {
// Delete the components of wpi. If wpi is NULL this is a noop.
WebPMuxImage* const next = MuxImageRelease(wpi);
free(wpi);
return next;