From 4de059c2291bd6b0191fd0990483fd90b1c722a1 Mon Sep 17 00:00:00 2001 From: Matt Rice Date: Sun, 12 Nov 2006 07:30:09 +0000 Subject: [PATCH] * GSMutableSkipArray.m: Fix bug when deallocating an empty list. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/performance/trunk@24076 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 4 ++++ GSSkipMutableArray.m | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 283ed96..2f92d27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-11-11 Matt Rice + + * GSMutableSkipArray.m: Fix bug when deallocating an empty list. + 2006-11-11 Richard Frith-Macdonald * GSThroughput.h: New ([add:duration:]) method. diff --git a/GSSkipMutableArray.m b/GSSkipMutableArray.m index 5668b76..7b02a9e 100644 --- a/GSSkipMutableArray.m +++ b/GSSkipMutableArray.m @@ -164,13 +164,14 @@ static Class concreteClass = 0; GSISLNode p,q; p = l->header->forward[0].next; - do + while (p != GSISLNil) { q = p->forward[0].next; RELEASE(p->value); NSZoneFree(l->zone,p); p = q; - } while (p != GSISLNil); + } + NSZoneFree(l->zone, l->header); NSZoneFree(l->zone, l); [super dealloc];