You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by mj...@apache.org on 2016/03/20 03:25:14 UTC
[44/50] incubator-guacamole-server git commit: GUAC-1164: Ensure
audio stream and context are freed upon disconnect.
GUAC-1164: Ensure audio stream and context are freed upon disconnect.
Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/commit/0a4bfc95
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/tree/0a4bfc95
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/diff/0a4bfc95
Branch: refs/heads/master
Commit: 0a4bfc95d17338ae12e92bb6d4ef0c06b98a9872
Parents: 8c37db8
Author: Michael Jumper <mi...@guac-dev.org>
Authored: Thu Mar 17 17:11:40 2016 -0700
Committer: Michael Jumper <mi...@guac-dev.org>
Committed: Thu Mar 17 17:30:32 2016 -0700
----------------------------------------------------------------------
src/protocols/rdp/rdp.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/0a4bfc95/src/protocols/rdp/rdp.c
----------------------------------------------------------------------
diff --git a/src/protocols/rdp/rdp.c b/src/protocols/rdp/rdp.c
index 083ca0d..80158db 100644
--- a/src/protocols/rdp/rdp.c
+++ b/src/protocols/rdp/rdp.c
@@ -981,18 +981,27 @@ static int guac_rdp_handle_connection(guac_client* client) {
pthread_mutex_lock(&(rdp_client->rdp_lock));
- /* Clean up RDP client */
+ /* Disconnect client and channels */
freerdp_channels_close(channels, rdp_inst);
freerdp_channels_free(channels);
freerdp_disconnect(rdp_inst);
+
+ /* Clean up RDP client context */
freerdp_clrconv_free(((rdp_freerdp_context*) rdp_inst->context)->clrconv);
cache_free(rdp_inst->context->cache);
+ freerdp_context_free(rdp_inst);
+
+ /* Clean up RDP client */
freerdp_free(rdp_inst);
/* Clean up filesystem, if allocated */
if (rdp_client->filesystem != NULL)
guac_rdp_fs_free(rdp_client->filesystem);
+ /* Clean up audio stream, if allocated */
+ if (rdp_client->audio != NULL)
+ guac_audio_stream_free(rdp_client->audio);
+
#ifdef ENABLE_COMMON_SSH
/* Free SFTP filesystem, if loaded */
if (rdp_client->sftp_filesystem)