mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-10 08:10:49 +00:00
Fix another leak
This commit is contained in:
parent
92ef562ebe
commit
9189f1bca6
1 changed files with 11 additions and 10 deletions
|
@ -1486,8 +1486,8 @@ recheck:
|
||||||
|
|
||||||
- (NSMutableArray*) parseDeclarations
|
- (NSMutableArray*) parseDeclarations
|
||||||
{
|
{
|
||||||
|
IF_NO_ARC(NSAutoreleasePool *arp = [NSAutoreleasePool new];)
|
||||||
NSMutableArray *declarations = [NSMutableArray array];
|
NSMutableArray *declarations = [NSMutableArray array];
|
||||||
CREATE_AUTORELEASE_POOL(arp);
|
|
||||||
static NSSet *qualifiers = nil;
|
static NSSet *qualifiers = nil;
|
||||||
static NSSet *keep = nil;
|
static NSSet *keep = nil;
|
||||||
NSString *baseName = nil;
|
NSString *baseName = nil;
|
||||||
|
@ -1516,7 +1516,7 @@ recheck:
|
||||||
@"unsigned",
|
@"unsigned",
|
||||||
@"volatile",
|
@"volatile",
|
||||||
nil];
|
nil];
|
||||||
IF_NO_ARC([qualifiers retain];)
|
IF_NO_ARC(qualifiers = [qualifiers retain];)
|
||||||
keep = [NSSet setWithObjects:
|
keep = [NSSet setWithObjects:
|
||||||
@"const",
|
@"const",
|
||||||
@"long",
|
@"long",
|
||||||
|
@ -1525,7 +1525,7 @@ recheck:
|
||||||
@"unsigned",
|
@"unsigned",
|
||||||
@"volatile",
|
@"volatile",
|
||||||
nil];
|
nil];
|
||||||
IF_NO_ARC([keep retain];)
|
IF_NO_ARC(keep = [keep retain];)
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -1573,7 +1573,7 @@ recheck:
|
||||||
pos++;
|
pos++;
|
||||||
[self skipSpaces];
|
[self skipSpaces];
|
||||||
}
|
}
|
||||||
IF_NO_ARC(DESTROY(arp);)
|
IF_NO_ARC([arp release];)
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1644,7 +1644,7 @@ recheck:
|
||||||
if (NO == isEnum)
|
if (NO == isEnum)
|
||||||
{
|
{
|
||||||
[self log: @"messed up NS_ENUM/NS_OPTIONS declaration"];
|
[self log: @"messed up NS_ENUM/NS_OPTIONS declaration"];
|
||||||
[arp drain];
|
IF_NO_ARC([arp release];)
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2008,8 +2008,8 @@ another:
|
||||||
{
|
{
|
||||||
if (buffer[pos] == ')' || buffer[pos] == ',')
|
if (buffer[pos] == ')' || buffer[pos] == ',')
|
||||||
{
|
{
|
||||||
[arp drain];
|
IF_NO_ARC(declarations = [declarations retain]; [arp release];)
|
||||||
return declarations;
|
return AUTORELEASE(declarations);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2131,7 +2131,6 @@ another:
|
||||||
}
|
}
|
||||||
DESTROY(comment);
|
DESTROY(comment);
|
||||||
|
|
||||||
[arp drain];
|
|
||||||
if (inArgList == NO)
|
if (inArgList == NO)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -2149,11 +2148,13 @@ another:
|
||||||
{
|
{
|
||||||
[self log: @"parse declaration with no name - %@", d];
|
[self log: @"parse declaration with no name - %@", d];
|
||||||
}
|
}
|
||||||
|
IF_NO_ARC([arp release];)
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[self setStandards: declarations];
|
[self setStandards: declarations];
|
||||||
return declarations;
|
IF_NO_ARC(declarations = [declarations retain]; [arp release];)
|
||||||
|
return AUTORELEASE(declarations);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2161,7 +2162,7 @@ another:
|
||||||
}
|
}
|
||||||
fail:
|
fail:
|
||||||
DESTROY(comment);
|
DESTROY(comment);
|
||||||
[arp drain];
|
IF_NO_ARC([arp release];)
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue