Don't dereference NULL, ensure HashChain fully initialized

Found by clang's static analyzer, they look validly uninitialized
to me.

Change-Id: I650250f516cdf6081b35cdfe92288c20a3036ac8
This commit is contained in:
Scott Talbot
2014-02-03 18:52:00 +11:00
committed by James Zern
parent 1d1cd3bbd6
commit 391316fee2
2 changed files with 16 additions and 13 deletions

View File

@ -959,7 +959,9 @@ static VP8LEncoder* VP8LEncoderNew(const WebPConfig* const config,
}
static void VP8LEncoderDelete(VP8LEncoder* enc) {
free(enc->argb_);
if (enc != NULL) {
free(enc->argb_);
}
free(enc);
}