diff --git a/src/libstrongswan/plugins/pem/pem_builder.c b/src/libstrongswan/plugins/pem/pem_builder.c index 9ca96a4d2..bdf0aec9a 100644 --- a/src/libstrongswan/plugins/pem/pem_builder.c +++ b/src/libstrongswan/plugins/pem/pem_builder.c @@ -450,7 +450,7 @@ static void *load_from_file(char *file, credential_type_t type, int subtype, return NULL; } cred = load_from_blob(*chunk, type, subtype, subject, flags); - chunk_unmap(chunk); + chunk_unmap_clear(chunk); return cred; }