From: Victor Julien Date: Wed, 25 Sep 2013 08:26:01 +0000 (+0200) Subject: profiling: properly clean up thread local memory. X-Git-Tag: suricata-2.0beta2~328 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6f450785fc046a2cf9df9380bc0c967530e0b8f7;p=thirdparty%2Fsuricata.git profiling: properly clean up thread local memory. --- diff --git a/src/util-profiling-rules.c b/src/util-profiling-rules.c index c3e6c0a235..af7aede291 100644 --- a/src/util-profiling-rules.c +++ b/src/util-profiling-rules.c @@ -512,6 +512,10 @@ void SCProfilingRuleThreadCleanup(DetectEngineThreadCtx *det_ctx) { pthread_mutex_lock(&det_ctx->de_ctx->profile_ctx->data_m); SCProfilingRuleThreadMerge(det_ctx->de_ctx, det_ctx); pthread_mutex_unlock(&det_ctx->de_ctx->profile_ctx->data_m); + + SCFree(det_ctx->rule_perf_data); + det_ctx->rule_perf_data = NULL; + det_ctx->rule_perf_data_size = 0; } /**