/* save mctx for later */
mctx = db->mctx;
/* return, and detach the memory */
- isc_mem_put(mctx, db, sizeof(bdb_instance_t));
- isc_mem_detach(&mctx);
+ isc_mem_putanddetach(&mctx, db, sizeof(bdb_instance_t));
}
}
/* save mctx for later */
mctx = db->mctx;
/* return, and detach the memory */
- isc_mem_put(mctx, db, sizeof(bdbhpt_instance_t));
- isc_mem_detach(&mctx);
+ isc_mem_putanddetach(&mctx, db, sizeof(bdbhpt_instance_t));
}
}
mctx = cd->mctx;
/* free config data memory */
- isc_mem_put(mctx, cd, sizeof(config_data_t));
-
- /* detach memory from context */
- isc_mem_detach(&mctx);
+ isc_mem_putanddetach(&mctx, cd, sizeof(config_data_t));
}
static dns_sdlzmethods_t dlz_fs_methods = {
isc_mem_free(named_g_mctx, cd->myname);
isc_mem_free(named_g_mctx, cd->myip);
mctx = cd->mctx;
- isc_mem_put(mctx, cd, sizeof(config_data_t));
- isc_mem_detach(&mctx);
+ isc_mem_putanddetach(&mctx, cd, sizeof(config_data_t));
}
static dns_sdlzmethods_t dlz_stub_methods = {
(void) isc_mutex_destroy(&dbi->instance_lock);
/* return, and detach the memory */
- isc_mem_put(mctx, dbi, sizeof(dbinstance_t));
- isc_mem_detach(&mctx);
+ isc_mem_putanddetach(&mctx, dbi, sizeof(dbinstance_t));
}
char *
/* Question */
packet[12] = '.';
- memcpy(&packet[13], zone, strlen(zone));
+ memmove(&packet[13], zone, strlen(zone));
packet[13 + strlen(zone)] = 0;
/* Make the question into labels */
if (h == NULL)
continue;
- memcpy(&addr.sin_addr, h->h_addr, h->h_length);
+ memmove(&addr.sin_addr, h->h_addr, h->h_length);
addrp = &addr.sin_addr;
/* Get the address for the nameserver into a string */