From: Wouter Wijngaards Date: Tue, 22 Jun 2010 12:27:19 +0000 (+0000) Subject: Fix to unload gost dynamic library module for leak test. X-Git-Tag: release-1.4.6rc1~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ed18b110835de1307d6f2f33c876fece0504767;p=thirdparty%2Funbound.git Fix to unload gost dynamic library module for leak test. git-svn-id: file:///svn/unbound/trunk@2161 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/config.h.in b/config.h.in index f98a5c69b..b5d2eb3c3 100644 --- a/config.h.in +++ b/config.h.in @@ -131,6 +131,9 @@ /* Define to 1 if you have the `kill' function. */ #undef HAVE_KILL +/* Define to 1 if you have the `ldns_key_EVP_unload_gost' function. */ +#undef HAVE_LDNS_KEY_EVP_UNLOAD_GOST + /* Define to 1 if you have the header file. */ #undef HAVE_LDNS_LDNS_H diff --git a/configure b/configure index 1a4d318a2..7608974fd 100755 --- a/configure +++ b/configure @@ -16360,6 +16360,17 @@ if test "x$ac_cv_func_ldns_key_EVP_load_gost_id" = x""yes; then : fi + for ac_func in ldns_key_EVP_unload_gost +do : + ac_fn_c_check_func "$LINENO" "ldns_key_EVP_unload_gost" "ac_cv_func_ldns_key_EVP_unload_gost" +if test "x$ac_cv_func_ldns_key_EVP_unload_gost" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LDNS_KEY_EVP_UNLOAD_GOST 1 +_ACEOF + +fi +done + else ac_cv_func_ldns_key_EVP_load_gost_id="yes" fi diff --git a/configure.ac b/configure.ac index 31ebe9c6a..538a5eafc 100644 --- a/configure.ac +++ b/configure.ac @@ -639,6 +639,7 @@ if test "$use_ldns_builtin" = "no"; then AC_CHECK_FUNC(ldns_b32_ntop_extended_hex) if test x$use_gost = xyes; then AC_CHECK_FUNC(ldns_key_EVP_load_gost_id) + AC_CHECK_FUNCS([ldns_key_EVP_unload_gost]) else ac_cv_func_ldns_key_EVP_load_gost_id="yes" fi diff --git a/daemon/daemon.c b/daemon/daemon.c index 5657a8b2e..2ab96b504 100644 --- a/daemon/daemon.c +++ b/daemon/daemon.c @@ -532,6 +532,9 @@ daemon_delete(struct daemon* daemon) ub_c_lex_destroy(); #endif /* libcrypto cleanup */ +#if defined(USE_GOST) && defined(HAVE_LDNS_KEY_EVP_UNLOAD_GOST) + ldns_key_EVP_unload_gost(); +#endif #if HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS sk_SSL_COMP_free(comp_meth); #endif diff --git a/doc/Changelog b/doc/Changelog index 5aa99ec0c..88b28f136 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,5 +1,6 @@ 22 June 2010: Wouter - Unbound reports libev or libevent correctly in logs in verbose mode. + - Fix to unload gost dynamic library module for leak testing. 18 June 2010: Wouter - iana portlist updated. diff --git a/ldns-src.tar.gz b/ldns-src.tar.gz index 3f8ebc640..da46f5e4d 100644 Binary files a/ldns-src.tar.gz and b/ldns-src.tar.gz differ diff --git a/testcode/testbound.c b/testcode/testbound.c index f61eea9bd..18e0d98b8 100644 --- a/testcode/testbound.c +++ b/testcode/testbound.c @@ -339,8 +339,13 @@ main(int argc, char* argv[]) fake_event_cleanup(); for(c=1; c