From d51a28bd5cd0b5ace0b458e30d0f4625eff85cde Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Mon, 17 Sep 2018 17:59:55 +0200 Subject: [PATCH] botan: Fix leak if hasher initialization fails --- src/libstrongswan/plugins/botan/botan_hasher.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libstrongswan/plugins/botan/botan_hasher.c b/src/libstrongswan/plugins/botan/botan_hasher.c index 3a8fcd8020..d574db0dc3 100644 --- a/src/libstrongswan/plugins/botan/botan_hasher.c +++ b/src/libstrongswan/plugins/botan/botan_hasher.c @@ -129,6 +129,7 @@ botan_hasher_t *botan_hasher_create(hash_algorithm_t algo) if (botan_hash_init(&this->hash, hash_name, 0)) { + free(this); return NULL; } return &this->public; -- 2.47.2