Merge pull request #4785 from ivan-leontiev/fix-networkremote-memleak

Fix memory leak in networkremote.
This commit is contained in:
John Maguire 2015-03-24 12:19:24 +01:00
commit d2ca9ac6ee
2 changed files with 2 additions and 0 deletions

View File

@ -175,6 +175,7 @@ void NetworkRemote::AcceptConnection() {
qLog(Info) << "Got a connection from public ip"
<< client_socket->peerAddress().toString();
client_socket->close();
client_socket->deleteLater();
} else {
CreateRemoteClient(client_socket);
}

View File

@ -56,6 +56,7 @@ RemoteClient::~RemoteClient() {
client_->waitForDisconnected(2000);
song_sender_->deleteLater();
client_->deleteLater();
}
void RemoteClient::setDownloader(bool downloader) { downloader_ = downloader; }