mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
memory leak fix
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@17805 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c4b038113d
commit
f68efed229
2 changed files with 6 additions and 13 deletions
|
@ -1,3 +1,8 @@
|
|||
2003-10-09 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* GSArray.m: memory leak decoding a placeholder fixed.
|
||||
Patch by <Roland.Schwingel@onevision.de>
|
||||
|
||||
2003-10-08 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Tools/gdomap.c: Added some checks that getting/setting uid/gid
|
||||
|
|
|
@ -969,25 +969,13 @@ static Class GSInlineArrayClass;
|
|||
unsigned c;
|
||||
|
||||
[aCoder decodeValueOfObjCType: @encode(unsigned) at: &c];
|
||||
a = (id)NSAllocateObject(GSInlineArrayClass, sizeof(id)*c,
|
||||
GSObjCZone(self));
|
||||
a = (id)NSAllocateObject(GSInlineArrayClass, sizeof(id)*c, GSObjCZone(self));
|
||||
a->_contents_array = (id*)&a[1];
|
||||
if (c > 0)
|
||||
{
|
||||
#if !GS_WITH_GC
|
||||
unsigned i;
|
||||
#endif
|
||||
|
||||
[aCoder decodeArrayOfObjCType: @encode(id)
|
||||
count: c
|
||||
at: a->_contents_array];
|
||||
#if !GS_WITH_GC
|
||||
for (i = 0; i < c; i++)
|
||||
{
|
||||
a->_contents_array[i] = RETAIN(a->_contents_array[i]);
|
||||
a->_count = i;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
a->_count = c;
|
||||
return a;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue