From 723e62ecd1e7894fee3b051657130c27db671bc4 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Tue, 4 Aug 2020 09:28:19 +1000 Subject: [PATCH] Fix leak of network replies when network content is fetched in a thread which is destroyed soon after Because the thread is destroyed, the event loops never executes and deleteLater is never called, resulting the a leak of the network reply --- src/core/qgsnetworkcontentfetcher.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/core/qgsnetworkcontentfetcher.cpp b/src/core/qgsnetworkcontentfetcher.cpp index 7ad2943c824..3bb46278624 100644 --- a/src/core/qgsnetworkcontentfetcher.cpp +++ b/src/core/qgsnetworkcontentfetcher.cpp @@ -31,10 +31,7 @@ QgsNetworkContentFetcher::~QgsNetworkContentFetcher() //cancel running request mReply->abort(); } - if ( mReply ) - { - mReply->deleteLater(); - } + delete mReply; } void QgsNetworkContentFetcher::fetchContent( const QUrl &url, const QString &authcfg )