remove unnecessary code
authorNils Larsch <nils@openssl.org>
Sat, 18 Mar 2006 14:22:20 +0000 (14:22 +0000)
committerNils Larsch <nils@openssl.org>
Sat, 18 Mar 2006 14:22:20 +0000 (14:22 +0000)
crypto/dsa/dsa_ossl.c
crypto/evp/evp_pkey.c
engines/e_4758cca.c
engines/e_chil.c
engines/e_sureware.c

index 9d90178006a6b1a4a6d65e3df65f9cc82f7d9613..7a66bcebb5040dda1113a8527cc1981d2c2fd4e0 100644 (file)
@@ -285,7 +285,6 @@ err:
                        BN_clear_free(r);
                }
        if (ctx_in == NULL) BN_CTX_free(ctx);
-       if (kinv != NULL) BN_clear_free(kinv);
        BN_clear_free(&k);
        BN_clear_free(&kq);
        return(ret);
index 0147f3e02a683979b43f10aaf60fbaefc06a59b8..2a02ab07937aba7af3d2a7bf37a30c1ffb600faf 100644 (file)
@@ -305,7 +305,7 @@ EVP_PKEY *EVP_PKCS82PKEY(PKCS8_PRIV_KEY_INFO *p8)
                                goto ecerr;
                        }
                        priv_key = EC_KEY_get0_private_key(eckey);
-                       if (!EC_POINT_mul(group, pub_key, priv_key, NULL, NULL, ctx))
+                       if (!EC_POINT_mul(group, pub_key, priv_key, NULL, NULL, NULL))
                        {
                                EC_POINT_free(pub_key);
                                EVPerr(EVP_F_EVP_PKCS82PKEY, ERR_R_EC_LIB);
@@ -321,12 +321,8 @@ EVP_PKEY *EVP_PKCS82PKEY(PKCS8_PRIV_KEY_INFO *p8)
                }
 
                EVP_PKEY_assign_EC_KEY(pkey, eckey);
-               if (ctx)
-                       BN_CTX_free(ctx);
                break;
 ecerr:
-               if (ctx)
-                       BN_CTX_free(ctx);
                if (eckey)
                        EC_KEY_free(eckey);
                if (pkey)
index 6bab385435972c85fa53d3211bfc2c6e28f38a84..a9089498cc02d61dc1fb2c604ad31b0e34b0f123 100644 (file)
@@ -482,8 +482,6 @@ static EVP_PKEY *ibm_4758_load_privkey(ENGINE* e, const char* key_id,
 err:
        if (keyToken)
                OPENSSL_free(keyToken);
-       if (rtmp)
-               RSA_free(rtmp);
        return NULL;
        }
 
@@ -558,8 +556,6 @@ static EVP_PKEY *ibm_4758_load_pubkey(ENGINE* e, const char* key_id,
 err:
        if (keyToken)
                OPENSSL_free(keyToken);
-       if (rtmp)
-               RSA_free(rtmp);
        return NULL;
        }
 
index 3d7568139639589d90d40cec6f66911802841c5e..04f2a535de6bcee19095eef75d7f12dda0ceabf1 100644 (file)
@@ -852,8 +852,6 @@ static EVP_PKEY *hwcrhk_load_privkey(ENGINE *eng, const char *key_id,
 
        return res;
  err:
-       if (res)
-               EVP_PKEY_free(res);
 #ifndef OPENSSL_NO_RSA
        if (rtmp)
                RSA_free(rtmp);
index 58fa9a98ee23b7b18dfdd03ec980fb339dcaaac2..cd0fa4c3979ce35034cd2b47f0428326cad4dd92 100644 (file)
@@ -758,8 +758,6 @@ static EVP_PKEY* sureware_load_public(ENGINE *e,const char *key_id,char *hptr,un
        }
        return res;
  err:
-       if (res)
-               EVP_PKEY_free(res);
 #ifndef OPENSSL_NO_RSA
        if (rsatmp)
                RSA_free(rsatmp);