]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3/libads: Only set result to kdc_str on success
authorNoel Power <noel.power@suse.com>
Fri, 4 Sep 2020 09:38:27 +0000 (10:38 +0100)
committerNoel Power <npower@samba.org>
Mon, 7 Sep 2020 13:23:40 +0000 (13:23 +0000)
Prior to this change result was set even when any or all errors
occured in the function.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libads/kerberos.c

index 63175bace085eb3acd9c8035db3ae5ffa184cbdc..49f942cdb968f29ff4006aee5da5e304a80600fd 100644 (file)
@@ -590,10 +590,10 @@ static char *get_kdc_ip_string(char *mem_ctx,
                kdc_str = new_kdc_str;
        }
 
+       result = kdc_str;
 out:
        DEBUG(10, ("get_kdc_ip_string: Returning %s\n", kdc_str));
 
-       result = kdc_str;
        TALLOC_FREE(ip_srv_site);
        TALLOC_FREE(ip_srv_nonsite);
        TALLOC_FREE(frame);