aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2017-03-15 11:16:35 +0100
committerTobias Brunner <tobias@strongswan.org>2017-05-23 18:29:11 +0200
commit5e37f7e55041929a4b7458bd7e1f24cd8a0edd8a (patch)
treef1a43943413be65e953fcf7263d4737465ba799f
parent157742be7deb5e5e12d962b20907b8e2e7733ac6 (diff)
downloadstrongswan-5e37f7e55041929a4b7458bd7e1f24cd8a0edd8a.tar.bz2
strongswan-5e37f7e55041929a4b7458bd7e1f24cd8a0edd8a.tar.xz
x509: Fix leak if a certificate contains multiple authorityKeyIdentifiers
-rw-r--r--src/libstrongswan/plugins/x509/x509_cert.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libstrongswan/plugins/x509/x509_cert.c b/src/libstrongswan/plugins/x509/x509_cert.c
index b3d90c5f6..7068853a8 100644
--- a/src/libstrongswan/plugins/x509/x509_cert.c
+++ b/src/libstrongswan/plugins/x509/x509_cert.c
@@ -1461,6 +1461,7 @@ static bool parse_certificate(private_x509_cert_t *this)
}
break;
case OID_AUTHORITY_KEY_ID:
+ chunk_free(&this->authKeyIdentifier);
this->authKeyIdentifier = x509_parse_authorityKeyIdentifier(
object, level, &this->authKeySerialNumber);
break;