This avoids ASAN to report leaks in case of fatal errors in tests.
TmqhCleanup();
TmModuleRunDeInit();
ParseSizeDeinit();
-#ifdef HAVE_NSS
- if (NSS_IsInitialized()) {
- NSS_Shutdown();
- PR_Cleanup();
- }
-#endif
#ifdef HAVE_AF_PACKET
AFPPeersListClean();
}
}
+#ifdef HAVE_NSS
+static void AtExitNSSShutdown(void)
+{
+ if (NSS_IsInitialized()) {
+ NSS_Shutdown();
+ PR_Cleanup();
+ }
+}
+#endif
+
/**
* This function is meant to contain code that needs
* to be run once the configuration has been loaded.
/* init NSS for hashing */
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
NSS_NoDB_Init(NULL);
+ atexit(AtExitNSSShutdown);
}
#endif