Fix memory leak in networkremote.

This commit is contained in:
Ivan Leontiev 2015-03-24 09:18:20 +00:00
parent 791aa482c2
commit aba0517b4c
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; }