diff options
Diffstat (limited to 'src/lib/libcrypto/x509/by_dir.c')
-rw-r--r-- | src/lib/libcrypto/x509/by_dir.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/libcrypto/x509/by_dir.c b/src/lib/libcrypto/x509/by_dir.c index ccf2f6e0bf..3b72fd302f 100644 --- a/src/lib/libcrypto/x509/by_dir.c +++ b/src/lib/libcrypto/x509/by_dir.c | |||
@@ -153,10 +153,10 @@ new_dir(X509_LOOKUP *lu) | |||
153 | { | 153 | { |
154 | BY_DIR *a; | 154 | BY_DIR *a; |
155 | 155 | ||
156 | if ((a = (BY_DIR *)OPENSSL_malloc(sizeof(BY_DIR))) == NULL) | 156 | if ((a = (BY_DIR *)malloc(sizeof(BY_DIR))) == NULL) |
157 | return (0); | 157 | return (0); |
158 | if ((a->buffer = BUF_MEM_new()) == NULL) { | 158 | if ((a->buffer = BUF_MEM_new()) == NULL) { |
159 | OPENSSL_free(a); | 159 | free(a); |
160 | return (0); | 160 | return (0); |
161 | } | 161 | } |
162 | a->dirs = NULL; | 162 | a->dirs = NULL; |
@@ -167,7 +167,7 @@ new_dir(X509_LOOKUP *lu) | |||
167 | static void | 167 | static void |
168 | by_dir_hash_free(BY_DIR_HASH *hash) | 168 | by_dir_hash_free(BY_DIR_HASH *hash) |
169 | { | 169 | { |
170 | OPENSSL_free(hash); | 170 | free(hash); |
171 | } | 171 | } |
172 | 172 | ||
173 | static int | 173 | static int |
@@ -185,10 +185,10 @@ static void | |||
185 | by_dir_entry_free(BY_DIR_ENTRY *ent) | 185 | by_dir_entry_free(BY_DIR_ENTRY *ent) |
186 | { | 186 | { |
187 | if (ent->dir) | 187 | if (ent->dir) |
188 | OPENSSL_free(ent->dir); | 188 | free(ent->dir); |
189 | if (ent->hashes) | 189 | if (ent->hashes) |
190 | sk_BY_DIR_HASH_pop_free(ent->hashes, by_dir_hash_free); | 190 | sk_BY_DIR_HASH_pop_free(ent->hashes, by_dir_hash_free); |
191 | OPENSSL_free(ent); | 191 | free(ent); |
192 | } | 192 | } |
193 | 193 | ||
194 | static void | 194 | static void |
@@ -201,7 +201,7 @@ free_dir(X509_LOOKUP *lu) | |||
201 | sk_BY_DIR_ENTRY_pop_free(a->dirs, by_dir_entry_free); | 201 | sk_BY_DIR_ENTRY_pop_free(a->dirs, by_dir_entry_free); |
202 | if (a->buffer != NULL) | 202 | if (a->buffer != NULL) |
203 | BUF_MEM_free(a->buffer); | 203 | BUF_MEM_free(a->buffer); |
204 | OPENSSL_free(a); | 204 | free(a); |
205 | } | 205 | } |
206 | 206 | ||
207 | static int | 207 | static int |
@@ -241,7 +241,7 @@ add_cert_dir(BY_DIR *ctx, const char *dir, int type) | |||
241 | return 0; | 241 | return 0; |
242 | } | 242 | } |
243 | } | 243 | } |
244 | ent = OPENSSL_malloc(sizeof(BY_DIR_ENTRY)); | 244 | ent = malloc(sizeof(BY_DIR_ENTRY)); |
245 | if (!ent) | 245 | if (!ent) |
246 | return 0; | 246 | return 0; |
247 | ent->dir_type = type; | 247 | ent->dir_type = type; |
@@ -411,12 +411,12 @@ get_cert_by_subject(X509_LOOKUP *xl, int type, X509_NAME *name, | |||
411 | ent->hashes, idx); | 411 | ent->hashes, idx); |
412 | } | 412 | } |
413 | if (!hent) { | 413 | if (!hent) { |
414 | hent = OPENSSL_malloc(sizeof(BY_DIR_HASH)); | 414 | hent = malloc(sizeof(BY_DIR_HASH)); |
415 | hent->hash = h; | 415 | hent->hash = h; |
416 | hent->suffix = k; | 416 | hent->suffix = k; |
417 | if (!sk_BY_DIR_HASH_push(ent->hashes, hent)) { | 417 | if (!sk_BY_DIR_HASH_push(ent->hashes, hent)) { |
418 | CRYPTO_w_unlock(CRYPTO_LOCK_X509_STORE); | 418 | CRYPTO_w_unlock(CRYPTO_LOCK_X509_STORE); |
419 | OPENSSL_free(hent); | 419 | free(hent); |
420 | ok = 0; | 420 | ok = 0; |
421 | goto finish; | 421 | goto finish; |
422 | } | 422 | } |