Skip to content

Commit

Permalink
[crypto] Fix memory leak in cms_verify_digest()
Browse files Browse the repository at this point in the history
Detected using Valgrind.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed May 4, 2012
1 parent 601cb36 commit 793b8b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/crypto/cms.c
Expand Up @@ -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;
Expand Down

0 comments on commit 793b8b0

Please sign in to comment.