X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fgcrypt%2Fcipher.c;h=d8e4cc5166c6f003028ed8f12e46e397e7fee8c9;hb=ef27852d0f5a5e31b21f256b3fb3074dd634b19d;hp=83065317494ef7c3006ca720cd425d7c973d03c0;hpb=2c6b2d70e6640f39563ad7bb0aa0ba87f883848c;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) {