diff --git a/lib/hx509/crypto.c b/lib/hx509/crypto.c index b6dc0077a..f231541b9 100644 --- a/lib/hx509/crypto.c +++ b/lib/hx509/crypto.c @@ -1577,7 +1577,7 @@ hx509_crypto_encrypt(hx509_crypto crypto, free(ivec->data); memset(ivec, 0, sizeof(*ivec)); } - if (ciphertext) { + if (*ciphertext) { if ((*ciphertext)->data) { free((*ciphertext)->data); }