mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
only create a memory pool if OPENSSL is defined.
This commit is contained in:
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Principal Author: Brian Wellington
|
* Principal Author: Brian Wellington
|
||||||
* $Id: dst_api.c,v 1.84 2001/07/10 04:01:15 bwelling Exp $
|
* $Id: dst_api.c,v 1.85 2001/07/10 05:00:42 bwelling Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
@@ -100,9 +100,10 @@ dst_lib_init(isc_mem_t *mctx, isc_entropy_t *ectx, unsigned int eflags) {
|
|||||||
REQUIRE(mctx != NULL && ectx != NULL);
|
REQUIRE(mctx != NULL && ectx != NULL);
|
||||||
REQUIRE(dst_initialized == ISC_FALSE);
|
REQUIRE(dst_initialized == ISC_FALSE);
|
||||||
|
|
||||||
UNUSED(mctx);
|
|
||||||
|
|
||||||
dst_memory_pool = NULL;
|
dst_memory_pool = NULL;
|
||||||
|
|
||||||
|
#ifdef OPENSSL
|
||||||
|
UNUSED(mctx);
|
||||||
/*
|
/*
|
||||||
* When using --with-openssl, there seems to be no good way of not
|
* When using --with-openssl, there seems to be no good way of not
|
||||||
* leaking memory due to the openssl error handling mechanism.
|
* leaking memory due to the openssl error handling mechanism.
|
||||||
@@ -113,6 +114,9 @@ dst_lib_init(isc_mem_t *mctx, isc_entropy_t *ectx, unsigned int eflags) {
|
|||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
return (result);
|
return (result);
|
||||||
isc_mem_setdestroycheck(dst_memory_pool, ISC_FALSE);
|
isc_mem_setdestroycheck(dst_memory_pool, ISC_FALSE);
|
||||||
|
#else
|
||||||
|
isc_mem_attach(mctx, &dst_memory_pool);
|
||||||
|
#endif
|
||||||
isc_entropy_attach(ectx, &dst_entropy_pool);
|
isc_entropy_attach(ectx, &dst_entropy_pool);
|
||||||
dst_entropy_flags = eflags;
|
dst_entropy_flags = eflags;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user