summaryrefslogtreecommitdiffstats
path: root/src/crypto
diff options
context:
space:
mode:
authorMichael Brown2012-05-04 16:32:20 +0200
committerMichael Brown2012-05-04 16:32:20 +0200
commit793b8b08931c8a4b89a9ac3348670705b7d5183e (patch)
tree5d890acc55a8b6c8f21bec06a7da2c5900fb11ae /src/crypto
parent[crypto] Parse OCSP responder URI from X.509 certificate (diff)
downloadipxe-793b8b08931c8a4b89a9ac3348670705b7d5183e.tar.gz
ipxe-793b8b08931c8a4b89a9ac3348670705b7d5183e.tar.xz
ipxe-793b8b08931c8a4b89a9ac3348670705b7d5183e.zip
[crypto] Fix memory leak in cms_verify_digest()
Detected using Valgrind. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/crypto')
-rw-r--r--src/crypto/cms.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/crypto/cms.c b/src/crypto/cms.c
index 12f17810..04fc2a88 100644
--- a/src/crypto/cms.c
+++ b/src/crypto/cms.c
@@ -509,9 +509,10 @@ static int cms_verify_digest ( struct cms_signature *sig,
info->signature_len ) ) != 0 ) {
DBGC ( sig, "CMS %p/%p signature verification failed: %s\n",
sig, info, strerror ( rc ) );
- return rc;
+ goto err_verify;
}
+ err_verify:
pubkey_final ( pubkey, ctx );
err_init:
return rc;