([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
This commit is contained in:
Andrew McCallum 1996-04-13 18:37:57 +00:00
parent 3e11ebacf5
commit 2e400e6677

View file

@ -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];