summaryrefslogtreecommitdiff
path: root/source3/winbindd/winbindd_cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/winbindd/winbindd_cache.c')
-rw-r--r--source3/winbindd/winbindd_cache.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c
index d0603d11c9..0e47a38f15 100644
--- a/source3/winbindd/winbindd_cache.c
+++ b/source3/winbindd/winbindd_cache.c
@@ -4619,10 +4619,15 @@ static struct winbindd_tdc_domain *wcache_tdc_dup_domain(
if (dst->domain_name == NULL) {
goto fail;
}
- dst->dns_name = talloc_strdup(dst, src->dns_name);
- if (dst->dns_name == NULL) {
- goto fail;
+
+ dst->dns_name = NULL;
+ if (src->dns_name != NULL) {
+ dst->dns_name = talloc_strdup(dst, src->dns_name);
+ if (dst->dns_name == NULL) {
+ goto fail;
+ }
}
+
sid_copy(&dst->sid, &src->sid);
dst->trust_flags = src->trust_flags;
dst->trust_type = src->trust_type;