forked from enlightenment/efl
emile: fix a potentional resource leaking.
'ctx' can be leaked in some case. this pathc fixes it. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11368
This commit is contained in:
parent
13d52be7e6
commit
3cf0bdd599
|
@ -193,8 +193,14 @@ on_error:
|
|||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
if (ctx)
|
||||
EVP_CIPHER_CTX_cleanup(ctx);
|
||||
#else
|
||||
if (ctx) {
|
||||
EVP_CIPHER_CTX_cleanup(ctx);
|
||||
EVP_CIPHER_CTX_free(ctx);
|
||||
}
|
||||
#endif /* if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) */
|
||||
|
||||
|
||||
free(buffer);
|
||||
|
||||
/* General error */
|
||||
|
|
Loading…
Reference in New Issue