From 0ebd08872ca9d492f47250a1cd4f94cfe9d40852 Mon Sep 17 00:00:00 2001 From: mccallum Date: Sat, 13 Apr 1996 18:37:57 +0000 Subject: [PATCH] ([ConstantCollection -_decodeContentsWithCoder:]): Use alloca(), not objc_malloc(), plugging memory leak. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1356 72102866-910b-0410-8b05-ffd578937521 --- Source/Collection.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Collection.m b/Source/Collection.m index 4404b8f5f..a054c4011 100644 --- a/Source/Collection.m +++ b/Source/Collection.m @@ -649,7 +649,7 @@ [aCoder decodeValueOfCType:@encode(unsigned) at:&count withName:NULL]; - OBJC_MALLOC(content_array, id, count); + content_array = alloca (sizeof (id) * count); for (i = 0; i < count; i++) [aCoder decodeObjectAt: &(content_array[i]) withName:NULL];