projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0713f8a
)
Fix memory leak.
author
Ben Laurie
<ben@openssl.org>
Sun, 5 Aug 2001 16:13:49 +0000
(16:13 +0000)
committer
Ben Laurie
<ben@openssl.org>
Sun, 5 Aug 2001 16:13:49 +0000
(16:13 +0000)
crypto/evp/evp_enc.c
patch
|
blob
|
history
diff --git
a/crypto/evp/evp_enc.c
b/crypto/evp/evp_enc.c
index d67f0cda431901fa07d2e74abb79146159cc60e7..e3ed556f2610dabd1c82aa1daf109ecd737ebc46 100644
(file)
--- a/
crypto/evp/evp_enc.c
+++ b/
crypto/evp/evp_enc.c
@@
-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;