Skip to content

Commit

Permalink
Fix leak of network replies when network content is fetched in a thread
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nyalldawson committed Aug 4, 2020
1 parent 78cea71 commit 723e62e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/core/qgsnetworkcontentfetcher.cpp
Expand Up @@ -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 )
Expand Down

0 comments on commit 723e62e

Please sign in to comment.