summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dh/dh_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/dh/dh_lib.c')
-rw-r--r--src/lib/libcrypto/dh/dh_lib.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libcrypto/dh/dh_lib.c b/src/lib/libcrypto/dh/dh_lib.c
index a40caaf75b..4e3d25b7e5 100644
--- a/src/lib/libcrypto/dh/dh_lib.c
+++ b/src/lib/libcrypto/dh/dh_lib.c
@@ -110,7 +110,7 @@ DH *DH_new_method(ENGINE *engine)
110 { 110 {
111 DH *ret; 111 DH *ret;
112 112
113 ret=(DH *)OPENSSL_malloc(sizeof(DH)); 113 ret=(DH *)malloc(sizeof(DH));
114 if (ret == NULL) 114 if (ret == NULL)
115 { 115 {
116 DHerr(DH_F_DH_NEW_METHOD,ERR_R_MALLOC_FAILURE); 116 DHerr(DH_F_DH_NEW_METHOD,ERR_R_MALLOC_FAILURE);
@@ -124,7 +124,7 @@ DH *DH_new_method(ENGINE *engine)
124 if (!ENGINE_init(engine)) 124 if (!ENGINE_init(engine))
125 { 125 {
126 DHerr(DH_F_DH_NEW_METHOD, ERR_R_ENGINE_LIB); 126 DHerr(DH_F_DH_NEW_METHOD, ERR_R_ENGINE_LIB);
127 OPENSSL_free(ret); 127 free(ret);
128 return NULL; 128 return NULL;
129 } 129 }
130 ret->engine = engine; 130 ret->engine = engine;
@@ -138,7 +138,7 @@ DH *DH_new_method(ENGINE *engine)
138 { 138 {
139 DHerr(DH_F_DH_NEW_METHOD,ERR_R_ENGINE_LIB); 139 DHerr(DH_F_DH_NEW_METHOD,ERR_R_ENGINE_LIB);
140 ENGINE_finish(ret->engine); 140 ENGINE_finish(ret->engine);
141 OPENSSL_free(ret); 141 free(ret);
142 return NULL; 142 return NULL;
143 } 143 }
144 } 144 }
@@ -167,7 +167,7 @@ DH *DH_new_method(ENGINE *engine)
167 ENGINE_finish(ret->engine); 167 ENGINE_finish(ret->engine);
168#endif 168#endif
169 CRYPTO_free_ex_data(CRYPTO_EX_INDEX_DH, ret, &ret->ex_data); 169 CRYPTO_free_ex_data(CRYPTO_EX_INDEX_DH, ret, &ret->ex_data);
170 OPENSSL_free(ret); 170 free(ret);
171 ret=NULL; 171 ret=NULL;
172 } 172 }
173 return(ret); 173 return(ret);
@@ -203,11 +203,11 @@ void DH_free(DH *r)
203 if (r->g != NULL) BN_clear_free(r->g); 203 if (r->g != NULL) BN_clear_free(r->g);
204 if (r->q != NULL) BN_clear_free(r->q); 204 if (r->q != NULL) BN_clear_free(r->q);
205 if (r->j != NULL) BN_clear_free(r->j); 205 if (r->j != NULL) BN_clear_free(r->j);
206 if (r->seed) OPENSSL_free(r->seed); 206 if (r->seed) free(r->seed);
207 if (r->counter != NULL) BN_clear_free(r->counter); 207 if (r->counter != NULL) BN_clear_free(r->counter);
208 if (r->pub_key != NULL) BN_clear_free(r->pub_key); 208 if (r->pub_key != NULL) BN_clear_free(r->pub_key);
209 if (r->priv_key != NULL) BN_clear_free(r->priv_key); 209 if (r->priv_key != NULL) BN_clear_free(r->priv_key);
210 OPENSSL_free(r); 210 free(r);
211 } 211 }
212 212
213int DH_up_ref(DH *r) 213int DH_up_ref(DH *r)