util-spm-hs: add missing deallocator

Add missing deallocator when hs_alloc_scratch fails.

Bug: #8146
pull/14618/head
Philippe Antoine 4 months ago committed by Victor Julien
parent 799f01f78f
commit 251d10fa42

@ -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;

Loading…
Cancel
Save