2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 05:57:52 +00:00

clear pointer before subtracting reference

This commit is contained in:
Mark Andrews 2020-09-14 11:02:33 +10:00
parent 5f45cea2c5
commit baf165ffd0

View File

@ -107,6 +107,8 @@ __wrap_isc_nmhandle_detach(isc_nmhandle_t **handlep) {
ns_client_t *client = (ns_client_t *)handle;
int i;
*handlep = NULL;
for (i = 0; i < 32; i++) {
if (atomic_load(&client_addrs[i]) == (uintptr_t)client) {
break;
@ -122,7 +124,6 @@ __wrap_isc_nmhandle_detach(isc_nmhandle_t **handlep) {
isc_mem_put(mctx, client, sizeof(ns_client_t));
}
*handlep = NULL;
return;
}