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