mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +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
f019a501be
commit
e26e55b324
1 changed files with 6 additions and 2 deletions
|
@ -62,8 +62,12 @@ static SEL eValSel = @selector(encodeValueOfObjCType:at:);
|
|||
|
||||
- (id) init
|
||||
{
|
||||
return [self initForWritingWithMutableData:
|
||||
[[_fastCls._NSMutableDataMalloc allocWithZone: [self zone]] init]];
|
||||
NSMutableData *d;
|
||||
|
||||
d = [[_fastCls._NSMutableDataMalloc allocWithZone: fastZone(self)] init];
|
||||
self = [self initForWritingWithMutableData: d];
|
||||
RELEASE(d);
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id) initForWritingWithMutableData: (NSMutableData*)anObject
|
||||
|
|
Loading…
Reference in a new issue