提交 fbeb55cd 编写于 作者: S Stefan Weil

Fix CID 1164526 (Resource leak in object)

stream_ was allocated in the constructor,
but the destructor did not free it.
Signed-off-by: NStefan Weil <sw@weilnetz.de>
上级 b87fc523
......@@ -279,6 +279,8 @@ void SVNetwork::Close() {
#else
close(stream_);
#endif
// Mark stream_ as invalid.
stream_ = -1;
}
......@@ -448,6 +450,7 @@ SVNetwork::SVNetwork(const char* hostname, int port) {
}
SVNetwork::~SVNetwork() {
Close();
delete[] msg_buffer_in_;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册