summaryrefslogtreecommitdiff
path: root/src/charon/credentials/sets/auth_info_wrapper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/charon/credentials/sets/auth_info_wrapper.c')
-rw-r--r--src/charon/credentials/sets/auth_info_wrapper.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/charon/credentials/sets/auth_info_wrapper.c b/src/charon/credentials/sets/auth_info_wrapper.c
index 32783ff93..7ec75be15 100644
--- a/src/charon/credentials/sets/auth_info_wrapper.c
+++ b/src/charon/credentials/sets/auth_info_wrapper.c
@@ -73,7 +73,7 @@ static bool fetch_cert(wrapper_enumerator_t *enumerator, auth_item_t *type, void
certificate_t *cert;
DBG1(DBG_CFG, " fetching certificate from '%s' ...", url);
- if (lib->fetcher->fetch(lib->fetcher, url, &data) != SUCCESS)
+ if (lib->fetcher->fetch(lib->fetcher, url, &data, FETCH_END) != SUCCESS)
{
DBG1(DBG_CFG, " fetching certificate failed");
/* we set the item to NULL, so we can skip it */
@@ -83,6 +83,7 @@ static bool fetch_cert(wrapper_enumerator_t *enumerator, auth_item_t *type, void
cert = lib->creds->create(lib->creds, CRED_CERTIFICATE, CERT_X509,
BUILD_BLOB_ASN1_DER, data, BUILD_END);
+ free(data.ptr);
if (!cert)
{