diff options
author | Tobias Brunner <tobias@strongswan.org> | 2013-04-10 19:25:26 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2013-05-08 15:02:38 +0200 |
commit | 162c06f2f55a0e88623589969af28b1539c3a012 (patch) | |
tree | f1dc4f1b7ebecd14bba88510ca0169b5764aab79 /src | |
parent | 9d4fc8677fe8bc10e023be5c0a887062191ae602 (diff) | |
download | strongswan-162c06f2f55a0e88623589969af28b1539c3a012.tar.bz2 strongswan-162c06f2f55a0e88623589969af28b1539c3a012.tar.xz |
Fix cleanup in crypto_tester if a crypter fails
Diffstat (limited to 'src')
-rw-r--r-- | src/libstrongswan/crypto/crypto_tester.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstrongswan/crypto/crypto_tester.c b/src/libstrongswan/crypto/crypto_tester.c index 12db0961b..5a0dccced 100644 --- a/src/libstrongswan/crypto/crypto_tester.c +++ b/src/libstrongswan/crypto/crypto_tester.c @@ -265,7 +265,10 @@ METHOD(crypto_tester_t, test_crypter, bool, failure: crypter->destroy(crypter); chunk_free(&cipher); - chunk_free(&plain); + if (plain.ptr != vector->plain) + { + chunk_free(&plain); + } if (failed) { DBG1(DBG_LIB, "disabled %N[%s]: %s test vector failed", |