From: Ed Kellett Date: Tue, 22 Oct 2019 17:44:19 +0000 (+0100) Subject: filter: avoid a memory leak per @amdj X-Git-Url: https://jfr.im/git/solanum.git/commitdiff_plain/09784400f25f385f3f8364304686b0f824a8c554 filter: avoid a memory leak per @amdj --- diff --git a/extensions/filter.c b/extensions/filter.c index 85239bdb..36c3e288 100644 --- a/extensions/filter.c +++ b/extensions/filter.c @@ -206,6 +206,7 @@ setfilter(const char *check, const char *data, const char **error) r = hs_alloc_scratch(db, &filter_scratch); if (r != HS_SUCCESS) { if (error) *error = "couldn't allocate scratch"; + hs_free_database(db); return -1; } if (filter_db) {