QHttpSocketEngine: Fix memory leak
The reply needs to be parented or it's not guaranteed to be deleted Change-Id: I7cbc31682f80dbbd9fb240fff9e6781cb6ca7b36 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit d8077a0973f362376b69564a730c74e5c9366f8f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
8f3dca4555
commit
93450a6ab2
@ -642,7 +642,7 @@ void QHttpSocketEngine::slotSocketReadNotification()
|
|||||||
d->socket->readAll();
|
d->socket->readAll();
|
||||||
//We're done with the reply and need to reset it for the next connection
|
//We're done with the reply and need to reset it for the next connection
|
||||||
delete d->reply;
|
delete d->reply;
|
||||||
d->reply = new QHttpNetworkReply;
|
d->reply = new QHttpNetworkReply(QUrl(), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priv->phase == QAuthenticatorPrivate::Done)
|
if (priv->phase == QAuthenticatorPrivate::Done)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user