Fix a possible leak on NETSCAPE_SPKI_verify failure.
authorFdaSilvaYY <fdasilvayy@gmail.com>
Sun, 3 Apr 2016 21:37:58 +0000 (23:37 +0200)
committerFdaSilvaYY <fdasilvayy@gmail.com>
Mon, 4 Apr 2016 18:38:15 +0000 (20:38 +0200)
Reviewed-by: Stephen Henson <steve@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
apps/ca.c

index 85766cccbbd97d3d1da3e8ff75e11a7e4b712ef8..cc74c5bd25581e94c82cda115fd22848ed4931d2 100644 (file)
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -2071,6 +2071,7 @@ static int certify_spkac(X509 **xret, char *infile, EVP_PKEY *pkey,
 
     j = NETSCAPE_SPKI_verify(spki, pktmp);
     if (j <= 0) {
+        EVP_PKEY_free(pktmp);
         BIO_printf(bio_err,
                    "signature verification failed on SPKAC public key\n");
         goto end;