unittests: don't leak memory with --list-unittests

pull/14025/head
Victor Julien 1 month ago committed by Victor Julien
parent ec6536ba75
commit 57d1f20dfa

@ -256,6 +256,11 @@ void RunUnittests(int list_unittests, const char *regex_arg)
TagInitCtx(); TagInitCtx();
/* test and initialize the unit testing subsystem */
if (regex_arg == NULL) {
regex_arg = ".*";
UtRunSelftest(regex_arg); /* inits and cleans up again */
}
UtInitialize(); UtInitialize();
RegisterAllModules(); RegisterAllModules();
@ -263,11 +268,6 @@ void RunUnittests(int list_unittests, const char *regex_arg)
HostBitInitCtx(); HostBitInitCtx();
StorageFinalize(); StorageFinalize();
/* test and initialize the unit testing subsystem */
if (regex_arg == NULL){
regex_arg = ".*";
UtRunSelftest(regex_arg); /* inits and cleans up again */
}
AppLayerHtpEnableRequestBodyCallback(); AppLayerHtpEnableRequestBodyCallback();
AppLayerHtpNeedFileInspection(); AppLayerHtpNeedFileInspection();

Loading…
Cancel
Save