aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2016-09-13 14:15:41 +0200
committerTobias Brunner <tobias@strongswan.org>2016-09-20 15:36:15 +0200
commitc0c14af8c26117f4877be9f808517fe3fb9b0bff (patch)
tree7a6095e837cb64e332c4a647eaff7f8f0aba609b
parent149b7de35c870434704a087135004a60cf3e771f (diff)
downloadstrongswan-c0c14af8c26117f4877be9f808517fe3fb9b0bff.tar.bz2
strongswan-c0c14af8c26117f4877be9f808517fe3fb9b0bff.tar.xz
ipseckey: Properly free public key after creating certificate
-rw-r--r--src/libcharon/plugins/ipseckey/ipseckey_cred.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcharon/plugins/ipseckey/ipseckey_cred.c b/src/libcharon/plugins/ipseckey/ipseckey_cred.c
index 6c041ce26..6f85994a2 100644
--- a/src/libcharon/plugins/ipseckey/ipseckey_cred.c
+++ b/src/libcharon/plugins/ipseckey/ipseckey_cred.c
@@ -105,11 +105,11 @@ METHOD(enumerator_t, cert_enumerator_enumerate, bool,
BUILD_NOT_BEFORE_TIME, this->notBefore,
BUILD_NOT_AFTER_TIME, this->notAfter,
BUILD_END);
+ public->destroy(public);
if (*cert == NULL)
{
DBG1(DBG_CFG, " failed to create certificate from IPSECKEY");
cur_ipseckey->destroy(cur_ipseckey);
- public->destroy(public);
continue;
}
cur_ipseckey->destroy(cur_ipseckey);