From 511e8049157bb8cc6f313b32da5cf98031437b1e Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 16 Feb 2017 15:27:09 +0100 Subject: [PATCH] detect: fix missing unlock in error path --- src/detect-engine.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/detect-engine.c b/src/detect-engine.c index db5a9d4197..8c0031b8d6 100644 --- a/src/detect-engine.c +++ b/src/detect-engine.c @@ -2004,9 +2004,10 @@ int DetectRegisterThreadCtxGlobalFuncs(const char *name, } item = SCCalloc(1, sizeof(*item)); - if (unlikely(item == NULL)) + if (unlikely(item == NULL)) { + SCMutexUnlock(&master->lock); return -1; - + } item->InitFunc = InitFunc; item->FreeFunc = FreeFunc; item->name = name; -- 2.47.2