x509: Fix leak when parsing CDPs if an invalid one follows valid ones
authorTobias Brunner <tobias@strongswan.org>
Sat, 20 May 2017 11:04:56 +0000 (13:04 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 23 May 2017 16:29:12 +0000 (18:29 +0200)
src/libstrongswan/plugins/x509/x509_cert.c

index 19ba1f8..ee630ee 100644 (file)
@@ -923,8 +923,8 @@ bool x509_parse_crlDistributionPoints(chunk_t blob, int level0,
 
 end:
        parser->destroy(parser);
-       uris->destroy(uris);
-       issuers->destroy(issuers);
+       uris->destroy_offset(uris, offsetof(identification_t, destroy));
+       issuers->destroy_offset(issuers, offsetof(identification_t, destroy));
 
        return success;
 }