From: Vitalii Serhiiovych Horbatov -X (vhorbato - SOFTSERVE INC at Cisco) Date: Wed, 20 Sep 2023 10:40:44 +0000 (+0000) Subject: Pull request #4010: detection: avoid multiple fixups of duplicated trees X-Git-Tag: 3.1.71.0~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b56197b9f4979e83fdbe6c128f508ebdd8c27fde;p=thirdparty%2Fsnort3.git Pull request #4010: detection: avoid multiple fixups of duplicated trees Merge in SNORT/snort3 from ~VHORBATO/snort3:fixup_tree_tsan to master Squashed commit of the following: commit aa509bd5fb8a21cc3365a427e434086401d15523 Author: vhorbato Date: Tue Sep 19 11:14:34 2023 +0300 detection: avoid multiple fixups of duplicated trees --- diff --git a/src/detection/fp_create.cc b/src/detection/fp_create.cc index 70dc24ad5..cca11ef03 100644 --- a/src/detection/fp_create.cc +++ b/src/detection/fp_create.cc @@ -121,7 +121,10 @@ static int finalize_detection_option_tree(SnortConfig* sc, detection_option_tree free_detection_option_tree(node); root->children[i] = (detection_option_tree_node_t*)dup_node; } - fixup_tree(root->children[i], true, 0); + else + { + fixup_tree(root->children[i], true, 0); + } debug_logf(detection_trace, TRACE_OPTION_TREE, nullptr, "%3d %3d %p %4s\n", 0, root->num_children, (void*)root, "root");