filter: avoid a memory leak per @amdj

This commit is contained in:
Ed Kellett 2019-10-22 18:44:19 +01:00
parent 0cbb1ba9f0
commit 09784400f2
No known key found for this signature in database
GPG key ID: CB9986DEF342FABC

View file

@ -206,6 +206,7 @@ setfilter(const char *check, const char *data, const char **error)
r = hs_alloc_scratch(db, &filter_scratch); r = hs_alloc_scratch(db, &filter_scratch);
if (r != HS_SUCCESS) { if (r != HS_SUCCESS) {
if (error) *error = "couldn't allocate scratch"; if (error) *error = "couldn't allocate scratch";
hs_free_database(db);
return -1; return -1;
} }
if (filter_db) { if (filter_db) {