On 2015/6/2 21:45, Daniel P. Berrange wrote: > + > +void qcrypto_cipher_free(QCryptoCipher *cipher) > +{ > + gcry_cipher_hd_t handle = cipher->opaque; > + if (!cipher) { > + return; > + }
The check is too late. :( > + gcry_cipher_close(handle); > + g_free(cipher); > +} Regards, -Gonglei