diff --git a/src/util-spm-hs.c b/src/util-spm-hs.c index cfcb8acd52..9d5cebd6ab 100644 --- a/src/util-spm-hs.c +++ b/src/util-spm-hs.c @@ -96,6 +96,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;