D19799: QNetworkReply was not deleted

Aleix Pol Gonzalez noreply at phabricator.kde.org
Sat Mar 16 16:20:09 GMT 2019


apol added inline comments.

INLINE COMMENTS

> FlatpakBackend.cpp:143
>          auto replyGet = get(QNetworkRequest(m_url));
> -
> +        QScopedPointer<QNetworkReply, QScopedPointerDeleteLater> replyPtr(replyGet);
>          connect(replyGet, &QNetworkReply::finished, this, [this, replyGet] {

This will crash here because it's passed into the connect, so it will be deleted when the function leaves and accessed from the lambda.

> FlatpakBackend.cpp:156
>              connect(replyPut, &QNetworkReply::finished, this, [this, originalUrl, fileUrl, replyPut]() {
>                  if (replyPut->error() != QNetworkReply::NoError) {
>                      qWarning() << "couldn't save" << originalUrl << replyPut->errorString();

This will crash too.

REPOSITORY
  R134 Discover Software Store

REVISION DETAIL
  https://phabricator.kde.org/D19799

To: mlaurent, apol, #discover_software_store
Cc: broulik, plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190316/64bb28ad/attachment.html>


More information about the Plasma-devel mailing list