From 7f8d256e7cfa0f062628d801cead18580a68f96b Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 26 Sep 2013 18:33:33 +0200 Subject: [PATCH] Fix tests that didn't expect radix to be freed --- src/app-layer-htp.c | 1 + src/detect-engine-iponly.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app-layer-htp.c b/src/app-layer-htp.c index c22b96a3f8..9fa7361402 100644 --- a/src/app-layer-htp.c +++ b/src/app-layer-htp.c @@ -1855,6 +1855,7 @@ void HTPFreeConfig(void) HTPCfgRec *nextrec = cfglist.next; SCRadixReleaseRadixTree(cfgtree); + cfgtree = NULL; htp_config_destroy(cfglist.cfg); while (nextrec != NULL) { HTPCfgRec *htprec = nextrec; diff --git a/src/detect-engine-iponly.c b/src/detect-engine-iponly.c index d4c23c088e..d22d339f37 100644 --- a/src/detect-engine-iponly.c +++ b/src/detect-engine-iponly.c @@ -899,19 +899,22 @@ void IPOnlyDeinit(DetectEngineCtx *de_ctx, DetectEngineIPOnlyCtx *io_ctx) { if (io_ctx->tree_ipv4src != NULL) SCRadixReleaseRadixTree(io_ctx->tree_ipv4src); + io_ctx->tree_ipv4src = NULL; if (io_ctx->tree_ipv4dst != NULL) SCRadixReleaseRadixTree(io_ctx->tree_ipv4dst); + io_ctx->tree_ipv4dst = NULL; if (io_ctx->tree_ipv6src != NULL) SCRadixReleaseRadixTree(io_ctx->tree_ipv6src); + io_ctx->tree_ipv6src = NULL; if (io_ctx->tree_ipv6dst != NULL) SCRadixReleaseRadixTree(io_ctx->tree_ipv6dst); + io_ctx->tree_ipv6dst = NULL; if (io_ctx->sig_init_array) SCFree(io_ctx->sig_init_array); - io_ctx->sig_init_array = NULL; } -- 2.47.3