From: Eric Leblond Date: Wed, 20 Jan 2021 20:17:04 +0000 (+0100) Subject: dataset: fix dataset string lookup X-Git-Tag: suricata-7.0.0-beta1~1847 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F5753%2Fhead;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. --- diff --git a/src/datasets.c b/src/datasets.c index b1dfcb0ff1..448e0b20cb 100644 --- a/src/datasets.c +++ b/src/datasets.c @@ -832,7 +832,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;