From 413550a0252af3e3c120dc6f762a8e9617937398 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Thu, 17 Sep 2015 15:58:38 -0400 Subject: [PATCH] (fix) memory leak when sync'ing GCS collections --- ActiveSync/SOGoActiveSyncDispatcher+Sync.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ActiveSync/SOGoActiveSyncDispatcher+Sync.m b/ActiveSync/SOGoActiveSyncDispatcher+Sync.m index 3ec9614d2..02de3d107 100644 --- a/ActiveSync/SOGoActiveSyncDispatcher+Sync.m +++ b/ActiveSync/SOGoActiveSyncDispatcher+Sync.m @@ -697,8 +697,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. [folderMetadata removeObjectForKey: @"InitialLoadSequence"]; } - allComponents = [theCollection syncTokenFieldsWithProperties: nil matchingSyncToken: theSyncKey fromDate: theFilterType initialLoad: initialLoadInProgress]; - allComponents = [allComponents sortedArrayUsingDescriptors: [NSArray arrayWithObjects: [[NSSortDescriptor alloc] initWithKey: @"c_lastmodified" ascending:YES], nil]]; + allComponents = [theCollection syncTokenFieldsWithProperties: nil + matchingSyncToken: theSyncKey + fromDate: theFilterType + initialLoad: initialLoadInProgress]; + allComponents = [allComponents sortedArrayUsingDescriptors: [NSArray arrayWithObject: [[NSSortDescriptor alloc] initWithKey: @"c_lastmodified" ascending: YES] autorelease]]; // Check for the WindowSize