projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix memory leaks found by valgrind.
[tinc]
/
src
/
openssl
/
cipher.c
diff --git
a/src/openssl/cipher.c
b/src/openssl/cipher.c
index
1ca15ab
..
abd652c
100644
(file)
--- a/
src/openssl/cipher.c
+++ b/
src/openssl/cipher.c
@@
-65,10
+65,8
@@
bool cipher_open_blowfish_ofb(cipher_t *cipher) {
void cipher_close(cipher_t *cipher) {
EVP_CIPHER_CTX_cleanup(&cipher->ctx);
void cipher_close(cipher_t *cipher) {
EVP_CIPHER_CTX_cleanup(&cipher->ctx);
- if(cipher->counter) {
- free(cipher->counter);
- cipher->counter = 0;
- }
+ free(cipher->counter);
+ cipher->counter = NULL;
}
size_t cipher_keylength(const cipher_t *cipher) {
}
size_t cipher_keylength(const cipher_t *cipher) {