1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

r17591: machine_account is unused, and ctx must be freed. Thanks Michael

(This used to be commit a347f8a9c4)
This commit is contained in:
Volker Lendecke 2006-08-17 14:38:59 +00:00 committed by Gerald (Jerry) Carter
parent 08e308fe2c
commit 8b39f5ef37

View File

@ -1168,11 +1168,10 @@ int net_ads_join(int argc, const char **argv)
ADS_STRUCT *ads = NULL;
ADS_STATUS status;
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
char *machine_account = NULL;
const char *short_domain_name = NULL;
char *tmp_password, *password;
struct cldap_netlogon_reply cldap_reply;
TALLOC_CTX *ctx;
TALLOC_CTX *ctx = NULL;
DOM_SID *domain_sid = NULL;
BOOL createupn = False;
const char *machineupn = NULL;
@ -1342,7 +1341,6 @@ int net_ads_join(int argc, const char **argv)
d_printf("Joined '%s' to realm '%s'\n", global_myname(), ads->config.realm);
SAFE_FREE(machine_account);
TALLOC_FREE( ctx );
ads_destroy(&ads);
@ -1353,6 +1351,7 @@ fail:
d_printf("Failed to join domain: %s\n",
get_friendly_nt_error_msg(nt_status));
ads_destroy(&ads);
TALLOC_FREE( ctx );
return -1;
}