Skip to content
This repository has been archived by the owner on Nov 25, 2022. It is now read-only.

Commit

Permalink
fix last netpgp memory leak found by valgrind in the current stress s…
Browse files Browse the repository at this point in the history
…etup
  • Loading branch information
r10s committed Nov 29, 2017
1 parent c98b726 commit 8baea59
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libs/netpgp/src/symmetric.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ cast5_init(pgp_crypt_t *crypt)
return 0;
}
CAST_set_key(crypt->encrypt_key, (int)crypt->keysize, crypt->key);


if (crypt->decrypt_key) {
free(crypt->decrypt_key);
}
if ((crypt->decrypt_key = calloc(1, sizeof(CAST_KEY))) == NULL) {
(void) fprintf(stderr, "cast5_init: alloc failure\n");
return 0;
Expand Down

0 comments on commit 8baea59

Please sign in to comment.