The .free_pools bitfield would not be set on some levels of
optimizations - workaround the compiler bug by reordering the setting
the .freepools in the initializer.
.magic = DNS_MESSAGE_MAGIC,
.namepool = namepool,
.rdspool = rdspool,
+ .free_pools = (namepool == NULL && rdspool == NULL),
};
isc_mem_attach(mctx, &msg->mctx);
- if (namepool == NULL && rdspool == NULL) {
+ if (msg->free_pools) {
dns_message_createpools(mctx, &msg->namepool, &msg->rdspool);
- msg->free_pools = true;
}
msginit(msg);