From: Victor Julien Date: Wed, 1 Nov 2017 09:16:15 +0000 (+0100) Subject: detect/profile: minor fixes X-Git-Tag: suricata-4.0.2~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ceec247db1622a404492b6869fc8fe430d41f593;p=thirdparty%2Fsuricata.git detect/profile: minor fixes --- diff --git a/src/detect-engine-profile.c b/src/detect-engine-profile.c index 90a9102ce2..24cc48467d 100644 --- a/src/detect-engine-profile.c +++ b/src/detect-engine-profile.c @@ -78,7 +78,7 @@ void RulesDumpMatchArray(const DetectEngineThreadCtx *det_ctx, const Packet *p) continue; json_t *js_sig = json_object(); - if (unlikely(js == NULL)) + if (unlikely(js_sig == NULL)) continue; json_object_set_new(js_sig, "sig_id", json_integer(s->id)); #if 0 @@ -130,8 +130,8 @@ void RulesDumpMatchArray(const DetectEngineThreadCtx *det_ctx, const Packet *p) if (fp != NULL) { MemBufferPrintToFPAsString(mbuf, fp); fclose(fp); - SCMutexUnlock(&g_rule_dump_write_m); } + SCMutexUnlock(&g_rule_dump_write_m); } MemBufferFree(mbuf);