Fix memory leak

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@8391 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2000-12-21 13:39:11 +00:00
parent dcbe706006
commit 0f4e809a97
2 changed files with 4 additions and 3 deletions

View file

@ -9,6 +9,7 @@
* Source/NSConnection.m: ditto
* Source/NSGDictionary.m: ditto
* Source/NSNotificationCenter.m: ditto
* Source/NSString.m: property list memory leak fixed.
2000-12-18 Richard Frith-Macdonald <rfm@gnu.org>

View file

@ -4083,7 +4083,7 @@ GSPropertyList(NSString *string)
[[[parser doc] root] name]);
return nil;
}
return RETAIN(nodeToObject([[[parser doc] root] children]));
return AUTORELEASE(RETAIN(nodeToObject([[[parser doc] root] children])));
}
#endif
d = [string dataUsingEncoding: NSUnicodeStringEncoding];
@ -4094,7 +4094,7 @@ GSPropertyList(NSString *string)
_pld.lin = 1;
if (plAlloc == 0)
setupPl();
return parsePlItem(pld);
return AUTORELEASE(parsePlItem(pld));
}
static id
@ -4184,6 +4184,6 @@ GSPropertyListFromStringsFormat(NSString *string)
return nil;
}
}
return dict;
return AUTORELEASE(dict);
}
#endif /* NO_GNUSTEP */