diff options
author | 2014-09-29 09:30:31 +0000 | |
---|---|---|
committer | 2014-09-29 09:30:31 +0000 | |
commit | a734056ae9e4216e1904eacfa045585b03058918 (patch) | |
tree | 4c1913c10fb23ab0ee5c32a8341b0a9a178ae3b1 /lib | |
parent | during a small refactor, we broke table_passwd. (diff) | |
download | wireguard-openbsd-a734056ae9e4216e1904eacfa045585b03058918.tar.xz wireguard-openbsd-a734056ae9e4216e1904eacfa045585b03058918.zip |
When freeing the config, explicitly call ressl_config_clear_keys() rather
than rerolling our own key clearing code.
ok tedu@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libressl/ressl_config.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/libressl/ressl_config.c b/lib/libressl/ressl_config.c index 319bba330da..106527c109e 100644 --- a/lib/libressl/ressl_config.c +++ b/lib/libressl/ressl_config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ressl_config.c,v 1.10 2014/09/28 14:46:09 jsing Exp $ */ +/* $OpenBSD: ressl_config.c,v 1.11 2014/09/29 09:30:31 jsing Exp $ */ /* * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> * @@ -84,16 +84,17 @@ ressl_config_free(struct ressl_config *config) { if (config == NULL) return; + + ressl_config_clear_keys(config); + free((char *)config->ca_file); free((char *)config->ca_path); free((char *)config->cert_file); free(config->cert_mem); free((char *)config->ciphers); free((char *)config->key_file); - if (config->key_mem != NULL) { - explicit_bzero(config->key_mem, config->key_len); - free(config->key_mem); - } + free(config->key_mem); + free(config); } |