diff options
author | Michal Srb <michalsrb@gmail.com> | 2017-03-27 13:55:46 +0300 |
---|---|---|
committer | Michal Srb <michalsrb@gmail.com> | 2017-03-27 13:55:46 +0300 |
commit | dccb5f7d776e93863ae10bbff56a45c523c6eeb0 (patch) | |
tree | 66470b930a2659ce7c585fa55cd6676f6377e19f /common/rfb/CConnection.cxx | |
parent | bf3bdac082978ca32895a4b6a123016094905689 (diff) | |
download | tigervnc-dccb5f7d776e93863ae10bbff56a45c523c6eeb0.tar.gz tigervnc-dccb5f7d776e93863ae10bbff56a45c523c6eeb0.zip |
Prevent leak of SecurityServer and ClientServer.
They are created in SConnection's and CConnection's constructors but never destroyed.
There is no reason for the indirection, so lets make them direct members.
Diffstat (limited to 'common/rfb/CConnection.cxx')
-rw-r--r-- | common/rfb/CConnection.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/common/rfb/CConnection.cxx b/common/rfb/CConnection.cxx index 20204181..88befd5e 100644 --- a/common/rfb/CConnection.cxx +++ b/common/rfb/CConnection.cxx @@ -44,7 +44,6 @@ CConnection::CConnection() state_(RFBSTATE_UNINITIALISED), useProtocol3_3(false), framebuffer(NULL), decoder(this) { - security = new SecurityClient(); } CConnection::~CConnection() @@ -167,7 +166,7 @@ void CConnection::processSecurityTypesMsg() int secType = secTypeInvalid; std::list<rdr::U8> secTypes; - secTypes = security->GetEnabledSecTypes(); + secTypes = security.GetEnabledSecTypes(); if (cp.isVersion(3,3)) { @@ -235,7 +234,7 @@ void CConnection::processSecurityTypesMsg() } state_ = RFBSTATE_SECURITY; - csecurity = security->GetCSecurity(secType); + csecurity = security.GetCSecurity(secType); processSecurityMsg(); } |