From 251d10fa42c25db64476442fb97c0ab162690247 Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Wed, 17 Dec 2025 20:31:57 +0100 Subject: [PATCH] util-spm-hs: add missing deallocator Add missing deallocator when hs_alloc_scratch fails. Bug: #8146 --- src/util-spm-hs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util-spm-hs.c b/src/util-spm-hs.c index a08fdb7daf..8f6cd9000d 100644 --- a/src/util-spm-hs.c +++ b/src/util-spm-hs.c @@ -94,6 +94,7 @@ static int HSBuildDatabase(const uint8_t *needle, uint16_t needle_len, /* If scratch allocation failed, this is not recoverable: other SPM * contexts may need this scratch space. */ SCLogError("Unable to alloc scratch for Hyperscan, returned %d.", err); + hs_free_database(db); return -1; } global_thread_ctx->ctx = scratch;