aboutsummaryrefslogtreecommitdiff
path: root/crypto/cipher-builtin.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/cipher-builtin.c')
-rw-r--r--crypto/cipher-builtin.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/cipher-builtin.c b/crypto/cipher-builtin.c
index c625cb40f7..912c1b947d 100644
--- a/crypto/cipher-builtin.c
+++ b/crypto/cipher-builtin.c
@@ -354,11 +354,13 @@ QCryptoCipher *qcrypto_cipher_new(QCryptoCipherAlgorithm alg,
void qcrypto_cipher_free(QCryptoCipher *cipher)
{
- QCryptoCipherBuiltin *ctxt = cipher->opaque;
+ QCryptoCipherBuiltin *ctxt;
+
if (!cipher) {
return;
}
+ ctxt = cipher->opaque;
ctxt->free(cipher);
g_free(cipher);
}