Make sure applications free up pkey structures and add netscape extension
[openssl.git] / apps / req.c
index 17f58d0..525995d 100644 (file)
@@ -663,7 +663,10 @@ loop:
                        }
 
                i=X509_REQ_verify(req,pkey);
                        }
 
                i=X509_REQ_verify(req,pkey);
-               if (tmp) pkey=NULL;
+               if (tmp) {
+                       EVP_PKEY_free(pkey);
+                       pkey=NULL;
+               }
 
                if (i < 0)
                        {
 
                if (i < 0)
                        {