From b667eb37b9e5aab1e96245b10db7df184f05e45d Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Thu, 30 Sep 2021 15:37:46 +0200 Subject: [PATCH] swanctl: Clear possibly unencrypted key/container files from memory --- src/swanctl/commands/load_creds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/swanctl/commands/load_creds.c b/src/swanctl/commands/load_creds.c index 2c1947dd1..c6c24d233 100644 --- a/src/swanctl/commands/load_creds.c +++ b/src/swanctl/commands/load_creds.c @@ -445,7 +445,7 @@ static void load_keys(load_ctx_t *ctx, char *type, char *dir) { load_key(ctx, path, type, *map); } - chunk_unmap(map); + chunk_unmap_clear(map); } else { @@ -552,7 +552,7 @@ static void load_containers(load_ctx_t *ctx, char *type, char *dir) if (map) { load_encrypted_container(ctx, rel, path, type, *map); - chunk_unmap(map); + chunk_unmap_clear(map); } else {