Fix memory leak

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24868 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2007-03-14 08:57:20 +00:00
parent bad585bb00
commit 97b76e81d1
2 changed files with 15 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2007-03-14 Richard Frith-Macdonald <rfm@gnu.org>
* Source/Additions/GSXML.m: Fix memory leak caused by url handle
retaining xmlrpc object as a client.
2007-03-13 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSLocale.m: Expect locale information (nl_langinfo) to be in

View file

@ -5076,7 +5076,6 @@ static void indentation(unsigned level, NSMutableString *str)
[handle writeProperty: pKey forKey: GSHTTPPropertyKeyFileKey];
[handle writeProperty: pwd forKey: GSHTTPPropertyPasswordKey];
}
[handle addClient: self];
#else
connectionURL = [url copy];
connection = nil;
@ -5310,6 +5309,7 @@ static void indentation(unsigned level, NSMutableString *str)
repeats: NO];
#ifdef GNUSTEP
[handle addClient: self];
[handle writeProperty: @"POST" forKey: GSHTTPPropertyMethodKey];
[handle writeProperty: @"GSXMLRPC/1.0.0" forKey: @"User-Agent"];
[handle writeProperty: @"text/xml" forKey: @"Content-Type"];
@ -5394,6 +5394,9 @@ static void indentation(unsigned level, NSMutableString *str)
ASSIGN(result, reason);
[timer invalidate];
timer = nil;
#ifdef GNUSTEP
[handle removeClient: self];
#endif
if ([delegate respondsToSelector: @selector(completedXMLRPC:)])
{
[delegate completedXMLRPC: self];
@ -5411,6 +5414,9 @@ static void indentation(unsigned level, NSMutableString *str)
[timer invalidate];
timer = nil;
#ifdef GNUSTEP
[handle removeClient: self];
#endif
str = [handle propertyForKeyIfAvailable: NSHTTPPropertyStatusCodeKey];
if (str == nil)
{
@ -5464,6 +5470,9 @@ static void indentation(unsigned level, NSMutableString *str)
[timer invalidate];
timer = nil;
#ifdef GNUSTEP
[handle removeClient: self];
#endif
if ([delegate respondsToSelector: @selector(completedXMLRPC:)])
{