mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Avoid possible leak caused by exception during property list parsing
This commit is contained in:
parent
75ae2da498
commit
1e5c30dc50
1 changed files with 3 additions and 2 deletions
|
@ -2734,8 +2734,9 @@ GSPropertyListMake(id obj, NSDictionary *loc, BOOL xml,
|
|||
GSBinaryPLParser *p = [GSBinaryPLParser alloc];
|
||||
|
||||
p = [p initWithData: data mutability: anOption];
|
||||
result = [p rootObject];
|
||||
RELEASE(p);
|
||||
/* to avoid a leak on exception, autorelease before parse
|
||||
*/
|
||||
result = [AUTORELEASE(p) rootObject];
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in a new issue