fix memory leak

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36858 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2013-07-09 09:30:03 +00:00
parent 7d5f098d75
commit c4dbae9cca
2 changed files with 9 additions and 5 deletions

View file

@ -1,3 +1,7 @@
2013-07-09 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSTLS.m: Fix memory leak (credentials)
2013-07-09 Richard Frith-Macdonald <rfm@gnu.org> 2013-07-09 Richard Frith-Macdonald <rfm@gnu.org>
* Headers/GNUstepBase/GSVersionMacros.h: * Headers/GNUstepBase/GSVersionMacros.h:

View file

@ -1107,7 +1107,7 @@ static NSMutableDictionary *credentialsCache = nil;
} }
} }
/* Get the key for our sertificat .. if one is specified. /* Get the key for our certificate .. if one is specified.
*/ */
if (nil != ck) if (nil != ck)
{ {
@ -1173,14 +1173,14 @@ static NSMutableDictionary *credentialsCache = nil;
- (void) dealloc - (void) dealloc
{ {
if (nil != key) if (nil != name)
{ {
gnutls_certificate_free_credentials(certcred); gnutls_certificate_free_credentials(certcred);
DESTROY(key); DESTROY(key);
DESTROY(list);
DESTROY(dhParams);
DESTROY(name);
} }
DESTROY(list);
DESTROY(dhParams);
DESTROY(name);
[super dealloc]; [super dealloc];
} }