From fe356f9d57ba83f2658c4e00ae8431bed23a389c Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Wed, 9 May 2012 16:53:53 -0700 Subject: [PATCH] Fix potential memory leak in KeyBlockVerify() BUG=none TEST=none Change-Id: I17f1cff7d6f750dfd862d71941c6b8cfec57b6bf Reviewed-on: https://gerrit.chromium.org/gerrit/22312 Commit-Ready: Bill Richardson Reviewed-by: Bill Richardson Tested-by: Bill Richardson --- firmware/lib/vboot_common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/firmware/lib/vboot_common.c b/firmware/lib/vboot_common.c index e074d61760..7878701f8e 100644 --- a/firmware/lib/vboot_common.c +++ b/firmware/lib/vboot_common.c @@ -280,6 +280,7 @@ int KeyBlockVerify(const VbKeyBlockHeader* block, uint64_t size, /* Make sure advertised signature data sizes are sane. */ if (block->key_block_size < sig->data_size) { VBDEBUG(("Signature calculated past end of the block\n")); + RSAPublicKeyFree(rsa); return VBOOT_KEY_BLOCK_INVALID; }