From 68a94082494ee91aa7e046a7e39ee807cb61f898 Mon Sep 17 00:00:00 2001 From: Martin Fleisz Date: Wed, 15 Feb 2017 14:59:24 +0100 Subject: [PATCH] core: Get rid of useless settings copy --- libfreerdp/core/connection.c | 17 ----------------- libfreerdp/core/rdp.c | 1 - libfreerdp/core/rdp.h | 1 - 3 files changed, 19 deletions(-) diff --git a/libfreerdp/core/connection.c b/libfreerdp/core/connection.c index 74e094e81..9ed1235e8 100644 --- a/libfreerdp/core/connection.c +++ b/libfreerdp/core/connection.c @@ -178,17 +178,6 @@ BOOL rdp_client_connect(rdpRdp* rdp) BOOL status; rdpSettings* settings = rdp->settings; - if (rdp->settingsCopy) - { - freerdp_settings_free(rdp->settingsCopy); - rdp->settingsCopy = NULL; - } - - rdp->settingsCopy = freerdp_settings_clone(settings); - - if (!rdp->settingsCopy) - return FALSE; - nego_init(rdp->nego); nego_set_target(rdp->nego, settings->ServerHostname, settings->ServerPort); @@ -313,12 +302,6 @@ BOOL rdp_client_disconnect(rdpRdp* rdp) { BOOL status; - if (rdp->settingsCopy) - { - freerdp_settings_free(rdp->settingsCopy); - rdp->settingsCopy = NULL; - } - status = nego_disconnect(rdp->nego); rdp_reset(rdp); diff --git a/libfreerdp/core/rdp.c b/libfreerdp/core/rdp.c index 85a2bf2ea..a5a5cf478 100644 --- a/libfreerdp/core/rdp.c +++ b/libfreerdp/core/rdp.c @@ -1694,7 +1694,6 @@ void rdp_free(rdpRdp* rdp) winpr_Cipher_Free(rdp->fips_encrypt); winpr_Cipher_Free(rdp->fips_decrypt); freerdp_settings_free(rdp->settings); - freerdp_settings_free(rdp->settingsCopy); transport_free(rdp->transport); license_free(rdp->license); input_free(rdp->input); diff --git a/libfreerdp/core/rdp.h b/libfreerdp/core/rdp.h index 0f1f6f101..f24c77e20 100644 --- a/libfreerdp/core/rdp.h +++ b/libfreerdp/core/rdp.h @@ -175,7 +175,6 @@ struct rdp_rdp BOOL resendFocus; BOOL deactivation_reactivation; BOOL AwaitCapabilities; - rdpSettings* settingsCopy; }; FREERDP_LOCAL BOOL rdp_read_security_header(wStream* s, UINT16* flags);