mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Fix leak
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@9203 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
edcf74b2e5
commit
1417d34bba
2 changed files with 13 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2001-02-21 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSString.m: Fix memory leak reported by thoran@free.fr
|
||||
parsePlItem()
|
||||
|
||||
2001-02-17 Nicola Pero <nicola@brainstorm.co.uk>
|
||||
|
||||
* Source/GNUmakefile (PACKAGE_NAME): Fixed typo - was gnutep-base
|
||||
|
|
|
@ -3805,12 +3805,14 @@ static id parsePlItem(pldata* pld)
|
|||
if (skipSpace(pld) == NO)
|
||||
{
|
||||
RELEASE(key);
|
||||
RELEASE(dict);
|
||||
return nil;
|
||||
}
|
||||
if (pld->ptr[pld->pos] != '=')
|
||||
{
|
||||
pld->err = @"unexpected character (wanted '=')";
|
||||
RELEASE(key);
|
||||
RELEASE(dict);
|
||||
return nil;
|
||||
}
|
||||
pld->pos++;
|
||||
|
@ -3818,12 +3820,14 @@ static id parsePlItem(pldata* pld)
|
|||
if (val == nil)
|
||||
{
|
||||
RELEASE(key);
|
||||
RELEASE(dict);
|
||||
return nil;
|
||||
}
|
||||
if (skipSpace(pld) == NO)
|
||||
{
|
||||
RELEASE(key);
|
||||
RELEASE(val);
|
||||
RELEASE(dict);
|
||||
return nil;
|
||||
}
|
||||
if (pld->ptr[pld->pos] == ';')
|
||||
|
@ -3835,6 +3839,7 @@ static id parsePlItem(pldata* pld)
|
|||
pld->err = @"unexpected character (wanted ';' or '}')";
|
||||
RELEASE(key);
|
||||
RELEASE(val);
|
||||
RELEASE(dict);
|
||||
return nil;
|
||||
}
|
||||
(*plSet)(dict, @selector(setObject:forKey:), val, key);
|
||||
|
@ -3865,11 +3870,13 @@ static id parsePlItem(pldata* pld)
|
|||
val = parsePlItem(pld);
|
||||
if (val == nil)
|
||||
{
|
||||
RELEASE(array);
|
||||
return nil;
|
||||
}
|
||||
if (skipSpace(pld) == NO)
|
||||
{
|
||||
RELEASE(val);
|
||||
RELEASE(array);
|
||||
return nil;
|
||||
}
|
||||
if (pld->ptr[pld->pos] == ',')
|
||||
|
@ -3880,6 +3887,7 @@ static id parsePlItem(pldata* pld)
|
|||
{
|
||||
pld->err = @"unexpected character (wanted ',' or ')')";
|
||||
RELEASE(val);
|
||||
RELEASE(array);
|
||||
return nil;
|
||||
}
|
||||
(*plAdd)(array, @selector(addObject:), val);
|
||||
|
|
Loading…
Reference in a new issue