summaryrefslogtreecommitdiffstats
path: root/src/oauth/qoauth2authorizationcodeflow.cpp
diff options
context:
space:
mode:
authorVolker Krause <vkrause@kde.org>2023-06-22 17:32:16 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2023-06-26 15:36:22 +0000
commit3e7c834b40cb952cb6685329dd86748386201806 (patch)
treeb485adef3ce9801a0cd14a1808839dddebd975cd /src/oauth/qoauth2authorizationcodeflow.cpp
parent6e92e1378eaa2db18dca1c2ddeef5ec7b84f49c2 (diff)
Don't leak token request network replies
Also, document how network replies passed to QAbstractAuthReplyHandler are deleted. Pick-to: 6.6 6.5 Change-Id: Id504776d0111f67dd3206b13e5ba3ccce1ca9be4 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/oauth/qoauth2authorizationcodeflow.cpp')
-rw-r--r--src/oauth/qoauth2authorizationcodeflow.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/oauth/qoauth2authorizationcodeflow.cpp b/src/oauth/qoauth2authorizationcodeflow.cpp
index 47229e4..aeae061 100644
--- a/src/oauth/qoauth2authorizationcodeflow.cpp
+++ b/src/oauth/qoauth2authorizationcodeflow.cpp
@@ -432,6 +432,7 @@ void QOAuth2AuthorizationCodeFlow::requestAccessToken(const QString &code)
QAbstractOAuthReplyHandler *handler = replyHandler();
QObject::connect(reply, &QNetworkReply::finished,
[handler, reply] { handler->networkReplyFinished(reply); });
+ connect(reply, &QNetworkReply::finished, reply, &QNetworkReply::deleteLater);
QObjectPrivate::connect(d->replyHandler.data(), &QAbstractOAuthReplyHandler::tokensReceived, d,
&QOAuth2AuthorizationCodeFlowPrivate::_q_accessTokenRequestFinished,
Qt::UniqueConnection);