mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 05:57:52 +00:00
Replace isc_mem_put()+isc_mem_detach() with isc_mem_putanddetach() in contrib/
This commit is contained in:
parent
341840c026
commit
de92c24b56
@ -373,8 +373,7 @@ bdb_cleanup(bdb_instance_t *db) {
|
|||||||
/* save mctx for later */
|
/* save mctx for later */
|
||||||
mctx = db->mctx;
|
mctx = db->mctx;
|
||||||
/* return, and detach the memory */
|
/* return, and detach the memory */
|
||||||
isc_mem_put(mctx, db, sizeof(bdb_instance_t));
|
isc_mem_putanddetach(&mctx, db, sizeof(bdb_instance_t));
|
||||||
isc_mem_detach(&mctx);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -463,8 +463,7 @@ bdbhpt_cleanup(bdbhpt_instance_t *db) {
|
|||||||
/* save mctx for later */
|
/* save mctx for later */
|
||||||
mctx = db->mctx;
|
mctx = db->mctx;
|
||||||
/* return, and detach the memory */
|
/* return, and detach the memory */
|
||||||
isc_mem_put(mctx, db, sizeof(bdbhpt_instance_t));
|
isc_mem_putanddetach(&mctx, db, sizeof(bdbhpt_instance_t));
|
||||||
isc_mem_detach(&mctx);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -936,10 +936,7 @@ fs_destroy(void *driverarg, void *dbdata)
|
|||||||
mctx = cd->mctx;
|
mctx = cd->mctx;
|
||||||
|
|
||||||
/* free config data memory */
|
/* free config data memory */
|
||||||
isc_mem_put(mctx, cd, sizeof(config_data_t));
|
isc_mem_putanddetach(&mctx, cd, sizeof(config_data_t));
|
||||||
|
|
||||||
/* detach memory from context */
|
|
||||||
isc_mem_detach(&mctx);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static dns_sdlzmethods_t dlz_fs_methods = {
|
static dns_sdlzmethods_t dlz_fs_methods = {
|
||||||
|
@ -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->myname);
|
||||||
isc_mem_free(named_g_mctx, cd->myip);
|
isc_mem_free(named_g_mctx, cd->myip);
|
||||||
mctx = cd->mctx;
|
mctx = cd->mctx;
|
||||||
isc_mem_put(mctx, cd, sizeof(config_data_t));
|
isc_mem_putanddetach(&mctx, cd, sizeof(config_data_t));
|
||||||
isc_mem_detach(&mctx);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static dns_sdlzmethods_t dlz_stub_methods = {
|
static dns_sdlzmethods_t dlz_stub_methods = {
|
||||||
|
@ -450,8 +450,7 @@ sdlzh_destroy_sqldbinstance(dbinstance_t *dbi)
|
|||||||
(void) isc_mutex_destroy(&dbi->instance_lock);
|
(void) isc_mutex_destroy(&dbi->instance_lock);
|
||||||
|
|
||||||
/* return, and detach the memory */
|
/* return, and detach the memory */
|
||||||
isc_mem_put(mctx, dbi, sizeof(dbinstance_t));
|
isc_mem_putanddetach(&mctx, dbi, sizeof(dbinstance_t));
|
||||||
isc_mem_detach(&mctx);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
|
@ -669,7 +669,7 @@ make_notify(const char *zone, int *packetlen) {
|
|||||||
|
|
||||||
/* Question */
|
/* Question */
|
||||||
packet[12] = '.';
|
packet[12] = '.';
|
||||||
memcpy(&packet[13], zone, strlen(zone));
|
memmove(&packet[13], zone, strlen(zone));
|
||||||
packet[13 + strlen(zone)] = 0;
|
packet[13 + strlen(zone)] = 0;
|
||||||
|
|
||||||
/* Make the question into labels */
|
/* Make the question into labels */
|
||||||
@ -755,7 +755,7 @@ notify(mysql_data_t *state, const char *zone, int sn) {
|
|||||||
if (h == NULL)
|
if (h == NULL)
|
||||||
continue;
|
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;
|
addrp = &addr.sin_addr;
|
||||||
|
|
||||||
/* Get the address for the nameserver into a string */
|
/* Get the address for the nameserver into a string */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user