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

(cherry picked from commit 57d1f20dfa)
pull/14039/head
Victor Julien 7 months ago committed by Victor Julien
parent 89cbaa7153
commit 62793c573f

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

Loading…
Cancel
Save