diff options
-rw-r--r-- | common/rfb/CConnection.cxx | 3 | ||||
-rw-r--r-- | common/rfb/CSecurity.h | 1 | ||||
-rw-r--r-- | common/rfb/SConnection.cxx | 3 | ||||
-rw-r--r-- | common/rfb/SSecurity.h | 1 |
4 files changed, 4 insertions, 4 deletions
diff --git a/common/rfb/CConnection.cxx b/common/rfb/CConnection.cxx index ce489b1b..d7a9d852 100644 --- a/common/rfb/CConnection.cxx +++ b/common/rfb/CConnection.cxx @@ -49,7 +49,8 @@ CConnection::CConnection() CConnection::~CConnection() { setFramebuffer(NULL); - if (csecurity) csecurity->destroy(); + if (csecurity) + delete csecurity; delete reader_; reader_ = 0; delete writer_; diff --git a/common/rfb/CSecurity.h b/common/rfb/CSecurity.h index 3fedc508..4bf4b38e 100644 --- a/common/rfb/CSecurity.h +++ b/common/rfb/CSecurity.h @@ -46,7 +46,6 @@ namespace rfb { public: virtual ~CSecurity() {} virtual bool processMsg(CConnection* cc)=0; - virtual void destroy() { delete this; } virtual int getType() const = 0; virtual const char* description() const = 0; virtual bool isSecure() const { return false; } diff --git a/common/rfb/SConnection.cxx b/common/rfb/SConnection.cxx index 6b810559..ae43254d 100644 --- a/common/rfb/SConnection.cxx +++ b/common/rfb/SConnection.cxx @@ -64,7 +64,8 @@ SConnection::SConnection() SConnection::~SConnection() { - if (ssecurity) ssecurity->destroy(); + if (ssecurity) + delete ssecurity; delete reader_; reader_ = 0; delete writer_; diff --git a/common/rfb/SSecurity.h b/common/rfb/SSecurity.h index 6da63c3c..0280574d 100644 --- a/common/rfb/SSecurity.h +++ b/common/rfb/SSecurity.h @@ -54,7 +54,6 @@ namespace rfb { public: virtual ~SSecurity() {} virtual bool processMsg(SConnection* sc)=0; - virtual void destroy() { delete this; } virtual int getType() const = 0; // getUserName() gets the name of the user attempting authentication. The |