提交 db753571 编写于 作者: B Ben Laurie

Fix memory leak.

上级 0713f8ab
......@@ -78,8 +78,8 @@ int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
if(enc && (enc != -1)) enc = 1;
if (cipher)
{
if(ctx->cipher_data)
OPENSSL_free(ctx->cipher_data);
if(ctx->cipher)
EVP_CIPHER_CTX_cleanup(ctx);
ctx->cipher=cipher;
ctx->cipher_data=OPENSSL_malloc(ctx->cipher->ctx_size);
ctx->key_len = cipher->key_len;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册