Skip to content

Commit

Permalink
Merge "Releasing reader_ memory for KSyncSockTcpSession." into R5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul v3 CI authored and opencontrail-ci-admin committed Jul 26, 2018
2 parents 972353b + 7bd3259 commit 3d2a830
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ksync/ksync_sock.h
Expand Up @@ -629,6 +629,7 @@ class KSyncSockTcpSession : public TcpSession {
public:
KSyncSockTcpSession(TcpServer *server, Socket *sock,
bool async_ready = false);
virtual ~KSyncSockTcpSession();
protected:
virtual void OnRead(Buffer buffer);
private:
Expand Down
6 changes: 6 additions & 0 deletions src/ksync/ksync_sock_tcp.cc
Expand Up @@ -296,6 +296,12 @@ KSyncSockTcpSession::KSyncSockTcpSession(TcpServer *server, Socket *sock,
boost::bind(&KSyncSockTcp::ReceiveMsg, tcp_ptr, _1, _2));
}

KSyncSockTcpSession::~KSyncSockTcpSession() {
if (reader_) {
delete reader_;
}
}

void KSyncSockTcpSession::OnRead(Buffer buffer) {
reader_->OnRead(buffer);
}
Expand Down

0 comments on commit 3d2a830

Please sign in to comment.