The HGFS server session was referenced with the session create request
handler in response to a new session request call from the guest.
Unfortunately, since there is no corresponding destroy session
request from the guests so the HGFS server session will
not get destroyed due to this reference. Furthermore, there is more
work required for the handling of the disabling of Shared Folders
feature wrt to session support. This is also coming later on.
Also, once the channel is destroyed and disconnects from the
HGFS server in response to a UI disable command of the
shared folders feature, the HGFS server session is lost and
therefore leaked. Additional consequence of this is that any
open handles with that session also then remain open as they
will not be closed until the VMX process is destroyed.
Fix is to remove the session referencing from the create session and
destroy session handlers until session support is completed and
correctly handled.
Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
}
if (HgfsPackCreateSessionReply(input->packet, input->metaPacket,
&replyPayloadSize, input->session)) {
+
+ /*
+ * XXX - TO BE RESTORED on session support implementation
+ * completion.
+ */
+#if defined HGFS_SESSION_SUPPORT
HgfsServerSessionGet(input->session);
+#endif
status = HGFS_ERROR_SUCCESS;
} else {
status = HGFS_ERROR_INTERNAL;
HGFS_ASSERT_INPUT(input);
HgfsServerCompleteRequest(HGFS_ERROR_SUCCESS, 0, input);
+ /*
+ * XXX - TO BE RESTORED on session support implementation
+ * completion.
+ */
+#if defined HGFS_SESSION_SUPPORT
HgfsServerSessionPut(input->session);
+#endif
}