auth-cfg-wrapper: Fix memory leak with hash-and-URL certificates
authorTobias Brunner <tobias@strongswan.org>
Mon, 12 Sep 2016 09:54:49 +0000 (11:54 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 12 Sep 2016 14:20:34 +0000 (16:20 +0200)
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

index c6b8d0c..8393d5b 100644 (file)
@@ -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;
 }