diff --git a/client/X11/xf_client.c b/client/X11/xf_client.c index d666d1f6b..afc066256 100644 --- a/client/X11/xf_client.c +++ b/client/X11/xf_client.c @@ -1617,7 +1617,6 @@ void* xf_thread(void *param) if (!exit_code) exit_code = freerdp_error_info(instance); - freerdp_channels_free(channels); freerdp_disconnect(instance); gdi_free(instance); @@ -1796,6 +1795,12 @@ static void xfreerdp_client_free(freerdp* instance, rdpContext* context) if (xfc->display) XCloseDisplay(xfc->display); + + if (context->channels) + { + freerdp_channels_free(context->channels); + context->channels = NULL; + } } } diff --git a/libfreerdp/core/settings.c b/libfreerdp/core/settings.c index f4952a71d..eabb8436d 100644 --- a/libfreerdp/core/settings.c +++ b/libfreerdp/core/settings.c @@ -519,6 +519,17 @@ rdpSettings* freerdp_settings_clone(rdpSettings* settings) _settings->LoadBalanceInfo = NULL; _settings->LoadBalanceInfoLength = 0; + _settings->TargetNetAddress = NULL; + _settings->RedirectionTargetFQDN = NULL; + _settings->RedirectionTargetNetBiosName = NULL; + _settings->RedirectionUsername = NULL; + _settings->RedirectionDomain = NULL; + _settings->RedirectionPassword = NULL; + _settings->RedirectionPasswordLength = 0; + _settings->RedirectionTsvUrl = NULL; + _settings->RedirectionTsvUrlLength = 0; + _settings->TargetNetAddressCount = 0; + _settings->TargetNetAddresses = NULL; if (settings->LoadBalanceInfo && settings->LoadBalanceInfoLength) {