diff --git a/src/libsync/syncjournaldb.cpp b/src/libsync/syncjournaldb.cpp index 358f0f352..75b55d9b9 100644 --- a/src/libsync/syncjournaldb.cpp +++ b/src/libsync/syncjournaldb.cpp @@ -457,6 +457,8 @@ void SyncJournalDb::close() _getFileRecordQuery.reset(0); _setFileRecordQuery.reset(0); + _setFileRecordChecksumQuery.reset(0); + _setFileRecordMetadataQuery.reset(0); _getDownloadInfoQuery.reset(0); _setDownloadInfoQuery.reset(0); _deleteDownloadInfoQuery.reset(0); @@ -468,6 +470,8 @@ void SyncJournalDb::close() _getErrorBlacklistQuery.reset(0); _setErrorBlacklistQuery.reset(0); _getSelectiveSyncListQuery.reset(0); + _getChecksumTypeIdQuery.reset(0); + _insertChecksumTypeQuery.reset(0); _db.close(); _avoidReadFromDbOnNextSyncFilter.clear(); diff --git a/src/libsync/syncjournaldb.h b/src/libsync/syncjournaldb.h index 69c7a769d..5aab92f55 100644 --- a/src/libsync/syncjournaldb.h +++ b/src/libsync/syncjournaldb.h @@ -166,6 +166,8 @@ private: QString _dbFile; QMutex _mutex; // Public functions are protected with the mutex. int _transaction; + + // NOTE! when adding a query, don't forget to reset it in SyncJournalDb::close QScopedPointer _getFileRecordQuery; QScopedPointer _setFileRecordQuery; QScopedPointer _setFileRecordChecksumQuery;