mirror of
https://github.com/nextcloud/desktop.git
synced 2024-12-21 13:14:30 +03:00
cf3846c565
The problem here is that we were sometimes allocating the error_string with qstrdup, which need to be released with delete[] and not free(). Simplify the code by using QString instead. ``` ==7230== Mismatched free() / delete / delete [] ==7230== at 0x4C2E10B: free (vg_replace_malloc.c:530) ==7230== by 0x57C2321: csync_s::reinitialize() (csync.cpp:247) ==7230== by 0x548130F: OCC::SyncEngine::finalize(bool) (syncengine.cpp:1212) ==7230== by 0x5481223: OCC::SyncEngine::handleSyncError(csync_s*, char const*) (syncengine.cpp:746) ==7230== by 0x5483E78: OCC::SyncEngine::slotDiscoveryJobFinished(int) (syncengine.cpp:965) ==7230== by 0x5495E34: QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<int>, void, void (OCC::SyncEngine::*)(int)>::call(void (OCC::SyncEngine::*)(int), OCC::SyncEngine*, void**) (qobjectdefs_impl.h:134) ==7230== by 0x5495D92: void QtPrivate::FunctionPointer<void (OCC::SyncEngine::*)(int)>::call<QtPrivate::List<int>, void>(void (OCC::SyncEngine::*)(int), OCC::SyncEngine*, void**) (qobjectdefs_impl.h:167) ==7230== by 0x5495CB5: QtPrivate::QSlotObject<void (OCC::SyncEngine::*)(int), QtPrivate::List<int>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (qobjectdefs_impl.h:396) ==7230== by 0xA9BF2E1: QObject::event(QEvent*) (in /usr/lib/libQt5Core.so.5.11.0) ==7230== by 0x64BE983: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/libQt5Widgets.so.5.11.0) ==7230== by 0x64C625A: QApplication::notify(QObject*, QEvent*) (in /usr/lib/libQt5Widgets.so.5.11.0) ==7230== by 0xA994BC8: QCoreApplication::notifyInternal2(QObject*, QEvent*) (in /usr/lib/libQt5Core.so.5.11.0) ==7230== Address 0x225b2640 is 0 bytes inside a block of size 50 alloc'd ==7230== at 0x4C2DC6F: operator new[](unsigned long) (vg_replace_malloc.c:423) ==7230== by 0xA7E8FC8: qstrdup(char const*) (in /usr/lib/libQt5Core.so.5.11.0) ==7230== by 0x53F5750: OCC::DiscoveryJob::remote_vio_opendir_hook(char const*, void*) (discoveryphase.cpp:666) ==7230== by 0x57E1278: csync_vio_opendir(csync_s*, char const*) (csync_vio.cpp:39) ==7230== by 0x57D718F: csync_ftw(csync_s*, char const*, int (*)(csync_s*, std::unique_ptr<csync_file_stat_s, std::default_delete<csync_file_stat_s> >), unsigned int) (csync_update.cpp:674) ==7230== by 0x57C1B05: csync_update(csync_s*) (csync.cpp:109) ==7230== by 0x53F5BCC: OCC::DiscoveryJob::start() (discoveryphase.cpp:718) ==7230== by 0x54B8F74: OCC::DiscoveryJob::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_discoveryphase.cpp:494) ==7230== by 0xA9BF2E1: QObject::event(QEvent*) (in /usr/lib/libQt5Core.so.5.11.0) ==7230== by 0x64BE983: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/libQt5Widgets.so.5.11.0) ==7230== by 0x64C625A: QApplication::notify(QObject*, QEvent*) (in /usr/lib/libQt5Widgets.so.5.11.0) ==7230== by 0xA994BC8: QCoreApplication::notifyInternal2(QObject*, QEvent*) (in /usr/lib/libQt5Core.so.5.11.0) ==7230== ``` |
||
---|---|---|
.. | ||
creds | ||
abstractnetworkjob.cpp | ||
abstractnetworkjob.h | ||
accessmanager.cpp | ||
accessmanager.h | ||
account.cpp | ||
account.h | ||
accountfwd.h | ||
bandwidthmanager.cpp | ||
bandwidthmanager.h | ||
capabilities.cpp | ||
capabilities.h | ||
clientproxy.cpp | ||
clientproxy.h | ||
clientsideencryption.cpp | ||
clientsideencryption.h | ||
clientsideencryptionjobs.cpp | ||
clientsideencryptionjobs.h | ||
CMakeLists.txt | ||
configfile.cpp | ||
configfile.h | ||
cookiejar.cpp | ||
cookiejar.h | ||
discoveryphase.cpp | ||
discoveryphase.h | ||
encryptfolderjob.cpp | ||
encryptfolderjob.h | ||
filesystem.cpp | ||
filesystem.h | ||
libsync.md | ||
localdiscoverytracker.cpp | ||
localdiscoverytracker.h | ||
logger.cpp | ||
logger.h | ||
networkjobs.cpp | ||
networkjobs.h | ||
nextcloudtheme.cpp | ||
nextcloudtheme.h | ||
owncloudpropagator.cpp | ||
owncloudpropagator.h | ||
owncloudpropagator_p.h | ||
progressdispatcher.cpp | ||
progressdispatcher.h | ||
propagatedownload.cpp | ||
propagatedownload.h | ||
propagatedownloadencrypted.cpp | ||
propagatedownloadencrypted.h | ||
propagateremotedelete.cpp | ||
propagateremotedelete.h | ||
propagateremotedeleteencrypted.cpp | ||
propagateremotedeleteencrypted.h | ||
propagateremotemkdir.cpp | ||
propagateremotemkdir.h | ||
propagateremotemove.cpp | ||
propagateremotemove.h | ||
propagateupload.cpp | ||
propagateupload.h | ||
propagateuploadencrypted.cpp | ||
propagateuploadencrypted.h | ||
propagateuploadng.cpp | ||
propagateuploadv1.cpp | ||
propagatorjobs.cpp | ||
propagatorjobs.h | ||
syncengine.cpp | ||
syncengine.h | ||
syncfileitem.cpp | ||
syncfileitem.h | ||
syncfilestatus.cpp | ||
syncfilestatus.h | ||
syncfilestatustracker.cpp | ||
syncfilestatustracker.h | ||
syncoptions.h | ||
syncresult.cpp | ||
syncresult.h | ||
theme.cpp | ||
theme.h | ||
wordlist.cpp | ||
wordlist.h |