From c4dbae9cca587abdb9cd069df19119ae31d17544 Mon Sep 17 00:00:00 2001 From: rfm Date: Tue, 9 Jul 2013 09:30:03 +0000 Subject: [PATCH] fix memory leak git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36858 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 4 ++++ Source/GSTLS.m | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) 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]; }