mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-26 18:21:04 +00:00
Fix memory leak in init.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4354 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7fbca4d40d
commit
917a76bf33
1 changed files with 6 additions and 2 deletions
|
@ -62,8 +62,12 @@ static SEL eValSel = @selector(encodeValueOfObjCType:at:);
|
||||||
|
|
||||||
- (id) init
|
- (id) init
|
||||||
{
|
{
|
||||||
return [self initForWritingWithMutableData:
|
NSMutableData *d;
|
||||||
[[_fastCls._NSMutableDataMalloc allocWithZone: [self zone]] init]];
|
|
||||||
|
d = [[_fastCls._NSMutableDataMalloc allocWithZone: fastZone(self)] init];
|
||||||
|
self = [self initForWritingWithMutableData: d];
|
||||||
|
RELEASE(d);
|
||||||
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) initForWritingWithMutableData: (NSMutableData*)anObject
|
- (id) initForWritingWithMutableData: (NSMutableData*)anObject
|
||||||
|
|
Loading…
Reference in a new issue