diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-10-21 09:41:46 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-10-21 09:41:46 +0900 |
commit | c8ae34af0c4b28ef5aabf60b97661241860bc200 (patch) | |
tree | d6f3c0275432da7c95d9ec86eb39b3d0647977e4 /lib/connectiondata.cpp | |
parent | 0a82e68f86a3b4716ebada39c041a6c8673d2999 (diff) | |
download | libquotient-c8ae34af0c4b28ef5aabf60b97661241860bc200.tar.gz libquotient-c8ae34af0c4b28ef5aabf60b97661241860bc200.zip |
ConnectionData: fix read-after-free in clearing the job queue
Diffstat (limited to 'lib/connectiondata.cpp')
-rw-r--r-- | lib/connectiondata.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/connectiondata.cpp b/lib/connectiondata.cpp index a3807fc4..cbc36420 100644 --- a/lib/connectiondata.cpp +++ b/lib/connectiondata.cpp @@ -67,7 +67,6 @@ ConnectionData::ConnectionData(QUrl baseUrl) for (auto& q : d->jobs) while (!q.empty()) { auto& job = q.front(); - q.pop(); if (!job || job->error() == BaseJob::Abandoned) continue; if (job->error() != BaseJob::Pending) { @@ -79,6 +78,7 @@ ConnectionData::ConnectionData(QUrl baseUrl) } job->sendRequest(); d->rateLimiter.start(); + q.pop(); return; } qCDebug(MAIN) << d->id() << "job queues are empty"; |