diff options
author | Bill Richardson <wfrichar@chromium.org> | 2012-05-09 16:53:53 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-05-09 20:14:03 -0700 |
commit | fe356f9d57ba83f2658c4e00ae8431bed23a389c (patch) | |
tree | c5b02b5566578f0556d08ba8aa03f25d4aa57012 | |
parent | 30795380537245e93c0a8232ea8fbeb95302d91e (diff) | |
download | vboot-fe356f9d57ba83f2658c4e00ae8431bed23a389c.tar.gz |
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 <wfrichar@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Bill Richardson <wfrichar@chromium.org>
-rw-r--r-- | firmware/lib/vboot_common.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/firmware/lib/vboot_common.c b/firmware/lib/vboot_common.c index e074d617..7878701f 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; } |