x509: Fix leak if a CRL contains multiple authorityKeyIdentifiers
authorTobias Brunner <tobias@strongswan.org>
Wed, 21 Feb 2018 10:13:42 +0000 (11:13 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 21 Feb 2018 10:13:42 +0000 (11:13 +0100)
src/libstrongswan/plugins/x509/x509_crl.c

index 699ac5a..5c5010b 100644 (file)
@@ -302,6 +302,7 @@ static bool parse(private_x509_crl_t *this)
                                                }
                                                break;
                                        case OID_AUTHORITY_KEY_ID:
+                                               chunk_free(&this->authKeyIdentifier);
                                                this->authKeyIdentifier =
                                                        x509_parse_authorityKeyIdentifier(
                                                                        object, level, &this->authKeySerialNumber);