]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
dataset: fix dataset string lookup 5753/head
authorEric Leblond <eric@regit.org>
Wed, 20 Jan 2021 20:17:04 +0000 (21:17 +0100)
committerEric Leblond <eric@regit.org>
Wed, 20 Jan 2021 20:43:28 +0000 (21:43 +0100)
The data was unlocked but the use_cnt was not decreased resulting
in the data entry not being removable.

src/datasets.c

index b1dfcb0ff1629f63bea497b55b12207000401174..448e0b20cb66ea3c9aaf7f613e7433b7611761d4 100644 (file)
@@ -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;