From 3649fe37ecb74562560e697a27734e0f3d606d98 Mon Sep 17 00:00:00 2001 From: theraven Date: Tue, 23 Oct 2012 08:27:42 +0000 Subject: [PATCH] Fix while -> if bug introduced when refactoring ARC code which caused infinite loop. Reported by Tom Davie. --- arc.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arc.m b/arc.m index 9b95c2f..252d1bf 100644 --- a/arc.m +++ b/arc.m @@ -134,13 +134,12 @@ static void emptyPool(struct arc_tls *tls, id *stop) static void cleanupPools(struct arc_tls* tls) { - struct arc_autorelease_pool *pool = tls->pool; if (tls->returnRetained) { release(tls->returnRetained); tls->returnRetained = nil; } - while(NULL != pool) + if (NULL != tls->pool) { emptyPool(tls, NULL); assert(NULL == tls->pool);