]> www.dolda2000.com Git - ashd.git/commitdiff
ratequeue: Fix rehash bug.
authorFredrik Tolf <fredrik@dolda2000.com>
Sat, 31 Aug 2024 14:25:40 +0000 (16:25 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Sat, 31 Aug 2024 14:25:40 +0000 (16:25 +0200)
src/ratequeue.c

index 21d6ec34f7ba00fb5e20ffafd98e40016c2827dc..a05187af54754f735bb12b107c58468de2efb159 100644 (file)
@@ -160,6 +160,7 @@ static void rehash(int nlen)
     if(nlen <= SBUCKETS) {
        nlen = SBUCKETS;
        new = sbuckets;
+       memset(sbuckets, 0, sizeof(sbuckets));
     } else {
        new = szmalloc(sizeof(*new) * (1 << nlen));
     }