Fix some leaks

This commit is contained in:
rfm 2024-06-21 15:53:55 +01:00
parent 4233f6a9d6
commit 50e1575b8d
6 changed files with 78 additions and 46 deletions

View file

@ -2849,23 +2849,23 @@ try:
}
if ([token isEqual: @"private"])
{
ASSIGN(validity, token);
validity = AUTORELEASE(RETAIN(token));
shouldDocument = documentInstanceVariables
&& documentAllInstanceVariables;
}
else if ([token isEqual: @"protected"])
{
ASSIGN(validity, token);
validity = AUTORELEASE(RETAIN(token));
shouldDocument = documentInstanceVariables;
}
else if ([token isEqual: @"package"])
{
ASSIGN(validity, token);
validity = AUTORELEASE(RETAIN(token));
shouldDocument = documentInstanceVariables;
}
else if ([token isEqual: @"public"])
{
ASSIGN(validity, token);
validity = AUTORELEASE(RETAIN(token));
shouldDocument = documentInstanceVariables;
}
else
@ -2938,7 +2938,7 @@ fail:
NSMutableArray *a = nil;
NSString *name;
dict = [[NSMutableDictionary alloc] initWithCapacity: 4];
dict = AUTORELEASE([[NSMutableDictionary alloc] initWithCapacity: 4]);
name = [self parseIdentifier];
if (nil == name)
{
@ -3035,11 +3035,11 @@ fail:
}
else
{
DESTROY(dict);
dict = nil;
}
RELEASE(a);
[self setStandards: dict];
return AUTORELEASE(dict);
return dict;
}
- (NSMutableDictionary*) parseMethodIsDeclaration: (BOOL)flag
@ -4094,6 +4094,7 @@ countAttributes(NSSet *keys, NSDictionary *a)
if (hadOstep)
{
[self log: @"multiple grouped OS_API_VERSION() calls"];
RELEASE(top);
return [self skipRemainderOfLine];
}
hadOstep = YES;
@ -4107,6 +4108,7 @@ countAttributes(NSSet *keys, NSDictionary *a)
if (hadGstep)
{
[self log: @"multiple grouped GS_API_VERSION() calls"];
RELEASE(top);
return [self skipRemainderOfLine];
}
hadGstep = YES;
@ -4308,6 +4310,7 @@ countAttributes(NSSet *keys, NSDictionary *a)
if (pos < length && (buffer[pos] == ',' || buffer[pos] == ';'))
{
[self skipStatement];
DESTROY(dict);
return nil;
}