From 883deb1c5d404c37bb70ecd562e847fc32cdcf53 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Tue, 9 Jan 2018 12:28:06 +0100 Subject: [PATCH] Fix potential crash in Composite job destruction Sentry: https://sentry.io/owncloud/desktop-win-and-mac/issues/427476987/ --- src/libsync/owncloudpropagator.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libsync/owncloudpropagator.h b/src/libsync/owncloudpropagator.h index 9655e1ac49..1ab653d73a 100644 --- a/src/libsync/owncloudpropagator.h +++ b/src/libsync/owncloudpropagator.h @@ -210,8 +210,9 @@ public: virtual ~PropagatorCompositeJob() { - qDeleteAll(_jobsToDo); - qDeleteAll(_runningJobs); + // Don't delete jobs in _jobsToDo and _runningJobs: they have parents + // that will be responsible for cleanup. Deleting them here would risk + // deleting something that has already been deleted by a shared parent. } void appendJob(PropagatorJob *job)