summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/conf/conf_mod.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/conf/conf_mod.c')
-rw-r--r--src/lib/libcrypto/conf/conf_mod.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/lib/libcrypto/conf/conf_mod.c b/src/lib/libcrypto/conf/conf_mod.c
index 994294f655..652ad6469a 100644
--- a/src/lib/libcrypto/conf/conf_mod.c
+++ b/src/lib/libcrypto/conf/conf_mod.c
@@ -197,7 +197,7 @@ int CONF_modules_load_file(const char *filename, const char *appname,
197 197
198 err: 198 err:
199 if (filename == NULL) 199 if (filename == NULL)
200 OPENSSL_free(file); 200 free(file);
201 NCONF_free(conf); 201 NCONF_free(conf);
202 202
203 return ret; 203 return ret;
@@ -296,7 +296,7 @@ static CONF_MODULE *module_add(DSO *dso, const char *name,
296 supported_modules = sk_CONF_MODULE_new_null(); 296 supported_modules = sk_CONF_MODULE_new_null();
297 if (supported_modules == NULL) 297 if (supported_modules == NULL)
298 return NULL; 298 return NULL;
299 tmod = OPENSSL_malloc(sizeof(CONF_MODULE)); 299 tmod = malloc(sizeof(CONF_MODULE));
300 if (tmod == NULL) 300 if (tmod == NULL)
301 return NULL; 301 return NULL;
302 302
@@ -308,7 +308,7 @@ static CONF_MODULE *module_add(DSO *dso, const char *name,
308 308
309 if (!sk_CONF_MODULE_push(supported_modules, tmod)) 309 if (!sk_CONF_MODULE_push(supported_modules, tmod))
310 { 310 {
311 OPENSSL_free(tmod); 311 free(tmod);
312 return NULL; 312 return NULL;
313 } 313 }
314 314
@@ -352,7 +352,7 @@ static int module_init(CONF_MODULE *pmod, char *name, char *value,
352 CONF_IMODULE *imod = NULL; 352 CONF_IMODULE *imod = NULL;
353 353
354 /* Otherwise add initialized module to list */ 354 /* Otherwise add initialized module to list */
355 imod = OPENSSL_malloc(sizeof(CONF_IMODULE)); 355 imod = malloc(sizeof(CONF_IMODULE));
356 if (!imod) 356 if (!imod)
357 goto err; 357 goto err;
358 358
@@ -404,10 +404,10 @@ static int module_init(CONF_MODULE *pmod, char *name, char *value,
404 if (imod) 404 if (imod)
405 { 405 {
406 if (imod->name) 406 if (imod->name)
407 OPENSSL_free(imod->name); 407 free(imod->name);
408 if (imod->value) 408 if (imod->value)
409 OPENSSL_free(imod->value); 409 free(imod->value);
410 OPENSSL_free(imod); 410 free(imod);
411 } 411 }
412 412
413 return -1; 413 return -1;
@@ -447,8 +447,8 @@ static void module_free(CONF_MODULE *md)
447 { 447 {
448 if (md->dso) 448 if (md->dso)
449 DSO_free(md->dso); 449 DSO_free(md->dso);
450 OPENSSL_free(md->name); 450 free(md->name);
451 OPENSSL_free(md); 451 free(md);
452 } 452 }
453 453
454/* finish and free up all modules instances */ 454/* finish and free up all modules instances */
@@ -472,9 +472,9 @@ static void module_finish(CONF_IMODULE *imod)
472 if (imod->pmod->finish) 472 if (imod->pmod->finish)
473 imod->pmod->finish(imod); 473 imod->pmod->finish(imod);
474 imod->pmod->links--; 474 imod->pmod->links--;
475 OPENSSL_free(imod->name); 475 free(imod->name);
476 OPENSSL_free(imod->value); 476 free(imod->value);
477 OPENSSL_free(imod); 477 free(imod);
478 } 478 }
479 479
480/* Add a static module to OpenSSL */ 480/* Add a static module to OpenSSL */
@@ -558,7 +558,7 @@ char *CONF_get1_default_config_file(void)
558#endif 558#endif
559 len += strlen(OPENSSL_CONF); 559 len += strlen(OPENSSL_CONF);
560 560
561 file = OPENSSL_malloc(len + 1); 561 file = malloc(len + 1);
562 562
563 if (!file) 563 if (!file)
564 return NULL; 564 return NULL;