From: Tobias Brunner Date: Mon, 17 Sep 2018 15:59:55 +0000 (+0200) Subject: botan: Fix leak if hasher initialization fails X-Git-Tag: 5.7.0rc2~20 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=d51a28bd5cd0b5ace0b458e30d0f4625eff85cde;p=thirdparty%2Fstrongswan.git botan: Fix leak if hasher initialization fails --- 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;