X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fgcrypt%2Fcipher.c;h=d8e4cc5166c6f003028ed8f12e46e397e7fee8c9;hb=bcac314fe2d758e85335d499dbb4300bfa8a599e;hp=83065317494ef7c3006ca720cd425d7c973d03c0;hpb=0c443c53163e97ebe9897984a4a2a5c5c620b4cc;p=tinc diff --git a/src/gcrypt/cipher.c b/src/gcrypt/cipher.c index 83065317..d8e4cc51 100644 --- a/src/gcrypt/cipher.c +++ b/src/gcrypt/cipher.c @@ -147,7 +147,8 @@ void cipher_close(cipher_t *cipher) { } free(cipher->key); - cipher->key = NULL; + + memset(cipher, 0, sizeof(*cipher)); } size_t cipher_keylength(const cipher_t *cipher) {