From 8efcc78f2b1c5a231fda6a2bfe401c0afafc4697 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Mon, 12 Sep 2016 11:54:49 +0200 Subject: [PATCH] auth-cfg-wrapper: Fix memory leak with hash-and-URL certificates We wrap the auth-cfg object and its contents, so there is no need to get an additional reference for the enumerated certificate. Fixes a44bb9345f04 ("merged multi-auth branch back into trunk") --- src/libstrongswan/credentials/sets/auth_cfg_wrapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstrongswan/credentials/sets/auth_cfg_wrapper.c b/src/libstrongswan/credentials/sets/auth_cfg_wrapper.c index c6b8d0c7e..8393d5b18 100644 --- a/src/libstrongswan/credentials/sets/auth_cfg_wrapper.c +++ b/src/libstrongswan/credentials/sets/auth_cfg_wrapper.c @@ -108,7 +108,7 @@ static bool fetch_cert(wrapper_enumerator_t *enumerator, } *value = cert; enumerator->auth->replace(enumerator->auth, enumerator->inner, - *rule, cert->get_ref(cert)); + *rule, cert); return TRUE; }