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;