diff --git a/contrib/dlz/drivers/dlz_bdb_driver.c b/contrib/dlz/drivers/dlz_bdb_driver.c index bde080ab16..ddfefd6d8f 100644 --- a/contrib/dlz/drivers/dlz_bdb_driver.c +++ b/contrib/dlz/drivers/dlz_bdb_driver.c @@ -373,8 +373,7 @@ bdb_cleanup(bdb_instance_t *db) { /* 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)); } } diff --git a/contrib/dlz/drivers/dlz_bdbhpt_driver.c b/contrib/dlz/drivers/dlz_bdbhpt_driver.c index 4d3d935607..03a3a3d0db 100644 --- a/contrib/dlz/drivers/dlz_bdbhpt_driver.c +++ b/contrib/dlz/drivers/dlz_bdbhpt_driver.c @@ -463,8 +463,7 @@ bdbhpt_cleanup(bdbhpt_instance_t *db) { /* 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)); } } diff --git a/contrib/dlz/drivers/dlz_filesystem_driver.c b/contrib/dlz/drivers/dlz_filesystem_driver.c index a3fe98dd67..c7383d5b47 100644 --- a/contrib/dlz/drivers/dlz_filesystem_driver.c +++ b/contrib/dlz/drivers/dlz_filesystem_driver.c @@ -936,10 +936,7 @@ fs_destroy(void *driverarg, void *dbdata) 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 = { diff --git a/contrib/dlz/drivers/dlz_stub_driver.c b/contrib/dlz/drivers/dlz_stub_driver.c index 02d856db90..6d16f2a318 100644 --- a/contrib/dlz/drivers/dlz_stub_driver.c +++ b/contrib/dlz/drivers/dlz_stub_driver.c @@ -255,8 +255,7 @@ stub_dlz_destroy(void *driverarg, void *dbdata) 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 = { diff --git a/contrib/dlz/drivers/sdlz_helper.c b/contrib/dlz/drivers/sdlz_helper.c index 6eb6629245..c8708c52e8 100644 --- a/contrib/dlz/drivers/sdlz_helper.c +++ b/contrib/dlz/drivers/sdlz_helper.c @@ -450,8 +450,7 @@ sdlzh_destroy_sqldbinstance(dbinstance_t *dbi) (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 * diff --git a/contrib/dlz/modules/mysqldyn/dlz_mysqldyn_mod.c b/contrib/dlz/modules/mysqldyn/dlz_mysqldyn_mod.c index f8e47f8f24..6ce095e941 100644 --- a/contrib/dlz/modules/mysqldyn/dlz_mysqldyn_mod.c +++ b/contrib/dlz/modules/mysqldyn/dlz_mysqldyn_mod.c @@ -669,7 +669,7 @@ make_notify(const char *zone, int *packetlen) { /* 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 */ @@ -755,7 +755,7 @@ notify(mysql_data_t *state, const char *zone, int sn) { 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 */