Fix to unload gost dynamic library module for leak test.

git-svn-id: file:///svn/unbound/trunk@2161 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards
2010-06-22 12:27:19 +00:00
parent afc09709ad
commit 4ed18b1108
8 changed files with 32 additions and 1 deletions
+6 -1
View File
@@ -339,8 +339,13 @@ main(int argc, char* argv[])
fake_event_cleanup();
for(c=1; c<pass_argc; c++)
free(pass_argv[c]);
if(res == 0)
if(res == 0) {
log_info("Testbound Exit Success");
#ifdef HAVE_PTHREAD
/* dlopen frees its thread state (dlopen of gost engine) */
pthread_exit(NULL);
#endif
}
return res;
}
+7
View File
@@ -522,6 +522,9 @@ main(int argc, char* argv[])
msgparse_test();
checklock_stop();
printf("%d checks ok.\n", testcount);
#if defined(USE_GOST) && defined(HAVE_LDNS_KEY_EVP_UNLOAD_GOST)
ldns_key_EVP_unload_gost();
#endif
#ifdef HAVE_OPENSSL_CONFIG
EVP_cleanup();
ENGINE_cleanup();
@@ -531,5 +534,9 @@ main(int argc, char* argv[])
ERR_remove_state(0);
ERR_free_strings();
RAND_cleanup();
#ifdef HAVE_PTHREAD
/* dlopen frees its thread specific state */
pthread_exit(NULL);
#endif
return 0;
}