Make sure applications free up pkey structures and add netscape extension
[openssl.git] / crypto / x509 / x509type.c
index 42c23bc..5274ded 100644 (file)
@@ -108,8 +108,9 @@ EVP_PKEY *pkey;
                break;
                }
 
                break;
                }
 
-       if (EVP_PKEY_size(pkey) <= 512)
+       if (EVP_PKEY_size(pk) <= 512)
                ret|=EVP_PKT_EXP;
                ret|=EVP_PKT_EXP;
+       if(pkey==NULL) EVP_PKEY_free(pk);
        return(ret);
        }
 
        return(ret);
        }