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 9d90178..7a66bce 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 0147f3e..2a02ab0 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 6bab385..a908949 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 3d75681..04f2a53 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 58fa9a9..cd0fa4c 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);