Browse Source

Merge pull request #6066 from DonLakeFlyer/FixLeaks

Fix leaking QNetworkReply
QGC4.4
Don Gagne 7 years ago committed by GitHub
parent
commit
c5b8d4e029
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      src/QGCFileDownload.cc

5
src/QGCFileDownload.cc

@ -95,7 +95,8 @@ void QGCFileDownload::_downloadFinished(void) @@ -95,7 +95,8 @@ void QGCFileDownload::_downloadFinished(void)
// When an error occurs or the user cancels the download, we still end up here. So bail out in
// those cases.
if (reply->error() != QNetworkReply::NoError) {
if (reply->error() != QNetworkReply::NoError) {
reply->deleteLater();
return;
}
@ -128,6 +129,8 @@ void QGCFileDownload::_downloadFinished(void) @@ -128,6 +129,8 @@ void QGCFileDownload::_downloadFinished(void)
qWarning() << errorMsg;
emit error(errorMsg);
}
reply->deleteLater();
}
/// @brief Called when an error occurs during download

Loading…
Cancel
Save