From 9c9f3ec9634442daf244e7a5c9a788990d84c6b0 Mon Sep 17 00:00:00 2001 From: Anoop Saldanha Date: Thu, 23 Dec 2010 17:23:14 +0530 Subject: [PATCH] fix mem leak in http_ engines --- src/detect-engine-hcbd.c | 4 ++++ src/detect-engine-hhd.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/detect-engine-hcbd.c b/src/detect-engine-hcbd.c index caa9b9b8c6..00c2519a56 100644 --- a/src/detect-engine-hcbd.c +++ b/src/detect-engine-hcbd.c @@ -513,6 +513,10 @@ void DetectEngineCleanHCBDBuffers(DetectEngineThreadCtx *det_ctx) SCFree(det_ctx->hcbd_buffers); det_ctx->hcbd_buffers = NULL; } + if (det_ctx->hcbd_buffers_len != NULL) { + SCFree(det_ctx->hcbd_buffers_len); + det_ctx->hcbd_buffers_len = NULL; + } det_ctx->hcbd_buffers_list_len = 0; } diff --git a/src/detect-engine-hhd.c b/src/detect-engine-hhd.c index 29cc73c537..9cbb7d3869 100644 --- a/src/detect-engine-hhd.c +++ b/src/detect-engine-hhd.c @@ -476,6 +476,10 @@ void DetectEngineCleanHHDBuffers(DetectEngineThreadCtx *det_ctx) SCFree(det_ctx->hhd_buffers); det_ctx->hhd_buffers = NULL; } + if (det_ctx->hhd_buffers_len != NULL) { + SCFree(det_ctx->hhd_buffers_len); + det_ctx->hhd_buffers_len = NULL; + } det_ctx->hhd_buffers_list_len = 0; }