From 6be768af42c7e21653149b81cfc1b2f09847d0f9 Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Thu, 20 Mar 2014 16:27:03 +0100 Subject: [PATCH] oc-sogo: Move memory clean up *after* handling the exception Otherwise the mess is full :) Signed-off-by: Kamen Mazdrashki --- OpenChange/MAPIStoreSOGo.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenChange/MAPIStoreSOGo.m b/OpenChange/MAPIStoreSOGo.m index 366b84421..3d091bf42 100644 --- a/OpenChange/MAPIStoreSOGo.m +++ b/OpenChange/MAPIStoreSOGo.m @@ -57,9 +57,10 @@ static BOOL leakDebugging = NO; #define TRYCATCH_START @try { #define TRYCATCH_END(pool) \ } @catch (NSException * e) { \ + enum mapistore_error ret = sogo_backend_handle_objc_exception(e, __PRETTY_FUNCTION__, __LINE__); \ [pool release]; \ GSUnregisterCurrentThread(); \ - return sogo_backend_handle_objc_exception(e, __PRETTY_FUNCTION__, __LINE__); \ + return ret; \ } static enum mapistore_error