struct dns_reg_state *dns_state = *dns_state_ptr;
if (dns_state == NULL) {
- *dns_state_ptr = dns_state = talloc(NULL, struct dns_reg_state);
+ dns_state = talloc_zero(NULL, struct dns_reg_state);
+ *dns_state_ptr = dns_state;
if (dns_state == NULL) {
return;
}