From 47ad6f4b59dc861ae8f17e41885c7f2947ff2bad Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sun, 6 Jan 2019 15:43:55 -0800 Subject: [PATCH] GUACAMOLE-662: Properly initialize nested socket index (fixes GUACAMOLE-510). --- src/libguac/socket-nest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libguac/socket-nest.c b/src/libguac/socket-nest.c index 6acac7d9..0c7d4711 100644 --- a/src/libguac/socket-nest.c +++ b/src/libguac/socket-nest.c @@ -129,8 +129,9 @@ guac_socket* guac_socket_nest(guac_socket* parent, int index) { guac_socket* socket = guac_socket_alloc(); __guac_socket_nest_data* data = malloc(sizeof(__guac_socket_nest_data)); - /* Store file descriptor as socket data */ + /* Store nested socket details as socket data */ data->parent = parent; + data->index = index; socket->data = data; /* Set write and free handlers */