]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #4010: detection: avoid multiple fixups of duplicated trees
authorVitalii Serhiiovych Horbatov -X (vhorbato - SOFTSERVE INC at Cisco) <vhorbato@cisco.com>
Wed, 20 Sep 2023 10:40:44 +0000 (10:40 +0000)
committerOleksii Shumeiko -X (oshumeik - SOFTSERVE INC at Cisco) <oshumeik@cisco.com>
Wed, 20 Sep 2023 10:40:44 +0000 (10:40 +0000)
Merge in SNORT/snort3 from ~VHORBATO/snort3:fixup_tree_tsan to master

Squashed commit of the following:

commit aa509bd5fb8a21cc3365a427e434086401d15523
Author: vhorbato <vhorbato@cisco.com>
Date:   Tue Sep 19 11:14:34 2023 +0300

    detection: avoid multiple fixups of duplicated trees

src/detection/fp_create.cc

index 70dc24ad57e02b6f96927ae89fc6bed6e38afaa0..cca11ef039a30b2549080c52f5213f1a2d0d3d91 100644 (file)
@@ -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");