QHttpSocketEngine: Fix memory leak

The reply needs to be parented or it's not guaranteed to be deleted

Pick-to: 6.2 6.1 5.15
Change-Id: I7cbc31682f80dbbd9fb240fff9e6781cb6ca7b36
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
bb10
Mårten Nordheim 2021-06-09 10:41:51 +02:00
parent 556fbbea6e
commit d8077a0973
1 changed files with 1 additions and 1 deletions

View File

@ -642,7 +642,7 @@ void QHttpSocketEngine::slotSocketReadNotification()
d->socket->readAll();
//We're done with the reply and need to reset it for the next connection
delete d->reply;
d->reply = new QHttpNetworkReply;
d->reply = new QHttpNetworkReply(QUrl(), this);
}
if (priv->phase == QAuthenticatorPrivate::Done)