diff --git a/src/corelib/tools/qcryptographichash.cpp b/src/corelib/tools/qcryptographichash.cpp index 07dc98a19c..abfef79cec 100644 --- a/src/corelib/tools/qcryptographichash.cpp +++ b/src/corelib/tools/qcryptographichash.cpp @@ -1309,7 +1309,6 @@ public: HashBlock key; HashResult result; - QBasicMutex finalizeMutex; QCryptographicHashPrivate messageHash; const QCryptographicHash::Algorithm method; @@ -1318,7 +1317,7 @@ public: void finalize(); // when not called from the static hash() function, this function needs to be - // called with finalizeMutex held: + // called with messageHash.finalizeMutex held: void finalizeUnchecked() noexcept; // END functions that need to be called with finalizeMutex held }; @@ -1571,7 +1570,7 @@ QByteArray QMessageAuthenticationCode::result() const void QMessageAuthenticationCodePrivate::finalize() { - const auto lock = qt_scoped_lock(finalizeMutex); + const auto lock = qt_scoped_lock(messageHash.finalizeMutex); if (!result.isEmpty()) return; finalizeUnchecked();