diff options
author | Andreas Schneider <asn@samba.org> | 2013-02-18 16:36:22 +0100 |
---|---|---|
committer | David Disseldorp <ddiss@suse.de> | 2013-03-05 23:29:11 +0100 |
commit | 14bae61ba36814ea5eca7c51cf1cc039e9e6803f (patch) | |
tree | 4605410a706e9b93b0dd47c47e143c0f007e327a /source3/winbindd/winbindd_cache.c | |
parent | e8e3a68729074c9dafb9a41df0ffa3a49c260772 (diff) | |
download | samba-14bae61ba36814ea5eca7c51cf1cc039e9e6803f.tar.gz |
winbind: Use talloc for allocating domain, dns, forest and dc name.
Reviewed-by: David Disseldorp <ddiss@samba.org>
Diffstat (limited to 'source3/winbindd/winbindd_cache.c')
-rw-r--r-- | source3/winbindd/winbindd_cache.c | 11 |
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; |