From: Jeremy Allison Date: Mon, 20 Jul 2020 23:56:14 +0000 (-0700) Subject: s3: libsmb: Cleanup - change to early continue in internal_resolve_name() for KDC... X-Git-Tag: talloc-2.3.2~971 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e74b323a4e4f5d9ebaf995a7a1a75baf2c33cbda;p=thirdparty%2Fsamba.git s3: libsmb: Cleanup - change to early continue in internal_resolve_name() for KDC resolve_ads(). No logic change. Signed-off-by: Jeremy Allison Reviewed-by: Isaac Boukris --- diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index c964d90fc4b..ea6aec5290a 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -2692,12 +2692,13 @@ NTSTATUS internal_resolve_name(const char *name, * This will result in a SRV record lookup */ status = resolve_ads(name, KDC_NAME_TYPE, sitename, return_iplist, return_count); - if (NT_STATUS_IS_OK(status)) { - /* Ensure we don't namecache - * this with the KDC port. */ - name_type = KDC_NAME_TYPE; - goto done; + if (!NT_STATUS_IS_OK(status)) { + continue; } + /* Ensure we don't namecache + * this with the KDC port. */ + name_type = KDC_NAME_TYPE; + goto done; } else if(strequal( tok, "ads")) { /* deal with 0x1c and 0x1b names here. * This will result in a SRV record lookup */