diff options
Diffstat (limited to 'src/buffer.c')
-rw-r--r-- | src/buffer.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c index 59397e4a50..628c82f186 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2306,6 +2306,10 @@ free_buf_options( clear_string_option(&buf->b_p_fex); #endif #ifdef FEAT_CRYPT +# ifdef FEAT_SODIUM + if (buf->b_p_key != NULL && (crypt_get_method_nr(buf) == CRYPT_M_SOD)) + sodium_munlock(buf->b_p_key, STRLEN(buf->b_p_key)); +# endif clear_string_option(&buf->b_p_key); #endif clear_string_option(&buf->b_p_kp); |