From 8b39f5ef37be33f8b9fb70eae11ae521545edea3 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 17 Aug 2006 14:38:59 +0000 Subject: r17591: machine_account is unused, and ctx must be freed. Thanks Michael (This used to be commit a347f8a9c480cf09abac9144e04ab2b13457e3b0) --- source3/utils/net_ads.c | 5 ++--- 1 file 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; } -- cgit