summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-08-17 14:38:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:38:41 -0500
commit8b39f5ef37be33f8b9fb70eae11ae521545edea3 (patch)
tree3463e4e2cbe7832a8137c10887a0d2111703ecbe
parent08e308fe2cdf6b9c7d7c96f3e29ff7209a4a63a9 (diff)
downloadsamba-8b39f5ef37be33f8b9fb70eae11ae521545edea3.tar.gz
samba-8b39f5ef37be33f8b9fb70eae11ae521545edea3.tar.bz2
samba-8b39f5ef37be33f8b9fb70eae11ae521545edea3.zip
r17591: machine_account is unused, and ctx must be freed. Thanks Michael
(This used to be commit a347f8a9c480cf09abac9144e04ab2b13457e3b0)
-rw-r--r--source3/utils/net_ads.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index bc17e1d66b..eb72cdba3f 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -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;
}