]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix atomics usage for mutexatomics
authorWitold Kręcicki <wpk@isc.org>
Tue, 28 Jan 2020 08:43:55 +0000 (09:43 +0100)
committerOndřej Surý <ondrej@isc.org>
Sat, 8 Feb 2020 20:34:19 +0000 (12:34 -0800)
lib/dns/resolver.c
lib/isc/hp.c

index c36a70c8a90ac7133673192af938245faa65dfbd..55273d8e1706abc5f68cdf28cff7eb4359358cca 100644 (file)
@@ -4832,7 +4832,7 @@ fctx_create(dns_resolver_t *res, const dns_name_t *name, dns_rdatatype_t type,
        fctx->vresult = ISC_R_SUCCESS;
        fctx->exitline = -1;    /* sentinel */
        fctx->logged = false;
-       atomic_store(&fctx->attributes, 0);
+       atomic_init(&fctx->attributes, 0);
        fctx->spilled = false;
        fctx->nqueries = 0;
        fctx->reason = NULL;
index b8bf8670a4ac3a7d4ff639bd6b234b6742fc1e08..56b9e5484bffe768df5ff1c907f706fed652db07 100644 (file)
@@ -135,7 +135,7 @@ void
 isc_hp_destroy(isc_hp_t *hp) {
        for (int i = 0; i < isc__hp_max_threads; i++) {
                isc_mem_put(hp->mctx, hp->hp[i],
-                           CLPAD * 2 * sizeof(uintptr_t));
+                           CLPAD * 2 * sizeof(hp->hp[i][0]));
 
                for (int j = 0; j < hp->rl[i]->size; j++) {
                        void *data = (void *)hp->rl[i]->list[j];