This clears out the memory, but also leaves ads->ldap as a valid (zero) IPaddr.
Otherwise it's left by accident as AF_UNSPEC (0).
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
NTSTATUS ntstatus;
char addr[INET6_ADDRSTRLEN];
- ZERO_STRUCT(ads->ldap);
+ ads_zero_ldap(ads);
ZERO_STRUCT(ads->ldap_wrap_data);
ads->ldap.last_attempt = time_mono(NULL);
ads->ldap_wrap_data.wrap_type = ADS_SASLWRAP_TYPE_PLAIN;
if (ads->ldap_wrap_data.mem_ctx) {
talloc_free(ads->ldap_wrap_data.mem_ctx);
}
- ZERO_STRUCT(ads->ldap);
+ ads_zero_ldap(ads);
ZERO_STRUCT(ads->ldap_wrap_data);
}