diff --git a/ChangeLog b/ChangeLog index db7b5ad87..cde4fe5c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-07-09 Richard Frith-Macdonald + + * Source/GSTLS.m: Fix memory leak (credentials) + 2013-07-09 Richard Frith-Macdonald * Headers/GNUstepBase/GSVersionMacros.h: diff --git a/Source/GSTLS.m b/Source/GSTLS.m index d4326ca16..d12508709 100644 --- a/Source/GSTLS.m +++ b/Source/GSTLS.m @@ -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) { @@ -1173,14 +1173,14 @@ static NSMutableDictionary *credentialsCache = nil; - (void) dealloc { - if (nil != key) + if (nil != name) { gnutls_certificate_free_credentials(certcred); DESTROY(key); + DESTROY(list); + DESTROY(dhParams); + DESTROY(name); } - DESTROY(list); - DESTROY(dhParams); - DESTROY(name); [super dealloc]; }