]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: fix potential deadlock during reload
authorVictor Julien <victor@inliniac.net>
Wed, 30 Mar 2016 17:53:04 +0000 (19:53 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 30 Mar 2016 17:53:04 +0000 (19:53 +0200)
If interrupted during the BreakLoop stage during reload, a deadlock
could happen.

src/detect-engine.c

index 50a69153adc437c38da5909645f2bf2bed958fd5..3d0b4b52d61de4c07d887f5c0148a7e1d0bd52e7 100644 (file)
@@ -551,6 +551,7 @@ static void BreakCapture(void)
         TmSlot *slots = tv->tm_slots;
         while (slots != NULL) {
             if (suricata_ctl_flags != 0) {
+                SCMutexUnlock(&tv_root_lock);
                 return;
             }