Fix bug in get_dc_name_via_netlogon(), null pointer refrence.
authorBo Yang <boyang@novell.com>
Wed, 14 Jan 2009 19:47:45 +0000 (11:47 -0800)
committerJeremy Allison <jra@samba.org>
Wed, 14 Jan 2009 19:47:45 +0000 (11:47 -0800)
source3/winbindd/winbindd_cm.c

index 962b6e6..ab1218c 100644 (file)
@@ -627,7 +627,7 @@ static bool get_dc_name_via_netlogon(struct winbindd_domain *domain,
                                                  DS_RETURN_DNS_NAME,
                                                  &domain_info,
                                                  &werr);
-               if (W_ERROR_IS_OK(werr)) {
+               if (NT_STATUS_IS_OK(result) && W_ERROR_IS_OK(werr)) {
                        tmp = talloc_strdup(
                                mem_ctx, domain_info->dc_unc);
                        if (tmp == NULL) {