From: Eric Leblond Date: Wed, 20 Jan 2021 20:17:04 +0000 (+0100) Subject: dataset: fix dataset string lookup X-Git-Tag: suricata-5.0.6~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=404d74df0df3fe8142e1de859a4055a4674192f7;p=thirdparty%2Fsuricata.git dataset: fix dataset string lookup The data was unlocked but the use_cnt was not decreased resulting in the data entry not being removable. (cherry picked from commit 64f994f753b9109c8f788e3a6dbe4c72f6e69d94) --- diff --git a/src/datasets.c b/src/datasets.c index bd5f127624..cb4592e2c4 100644 --- a/src/datasets.c +++ b/src/datasets.c @@ -705,7 +705,7 @@ static int DatasetLookupString(Dataset *set, const uint8_t *data, const uint32_t StringType lookup = { .ptr = (uint8_t *)data, .len = data_len, .rep.value = 0 }; THashData *rdata = THashLookupFromHash(set->hash, &lookup); if (rdata) { - THashDataUnlock(rdata); + DatasetUnlockData(rdata); return 1; } return 0;