summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2022-04-21 16:10:33 +0100
committerTomas Mraz <tomas@openssl.org>2022-04-25 13:20:13 +0200
commit64c85430f95200b6b51fe9475bd5203f7c19daf1 (patch)
treea426edb26cd86dd054228b0a50b23b4c1fb1ac60 /crypto
parentaf5b3af7bd48d3fd8fff70c689face7b552fdec0 (diff)
Fix bug in OPENSSL_LH_flush
Fixes #18139. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18141) (cherry picked from commit e5da68183410c06f7b350a0721bc2bd6057e438e)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/lhash/lhash.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/lhash/lhash.c b/crypto/lhash/lhash.c
index a15857cf9f..1cd988f01f 100644
--- a/crypto/lhash/lhash.c
+++ b/crypto/lhash/lhash.c
@@ -100,6 +100,8 @@ void OPENSSL_LH_flush(OPENSSL_LHASH *lh)
}
lh->b[i] = NULL;
}
+
+ lh->num_items = 0;
}
void *OPENSSL_LH_insert(OPENSSL_LHASH *lh, void *data)