]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:libsmb: fix resolve_ads return if there were no answers
authorMichael Adam <obnox@samba.org>
Tue, 30 Jun 2015 14:51:43 +0000 (16:51 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 1 Jul 2015 21:05:55 +0000 (23:05 +0200)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: "Stefan (metze) Metzmacher" <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libsmb/namequery.c

index 5e48474b2d5dcc08c4d103136f4f108d79d81861..7eb5dff6cf56e2728539cc0f97e6ab8bf61f57e5 100644 (file)
@@ -2478,6 +2478,13 @@ static NTSTATUS resolve_ads(const char *name,
                return status;
        }
 
+       if (numdcs == 0) {
+               *return_iplist = NULL;
+               *return_count = 0;
+               talloc_destroy(ctx);
+               return NT_STATUS_OK;
+       }
+
        for (i=0;i<numdcs;i++) {
                if (!dcs[i].ss_s) {
                        numaddrs += 1;