diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-10-21 11:16:28 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-10-21 11:16:28 -0400 |
commit | 9c4a0aef0c0d8e1c3ad8d9ed7b655eae8a175ccb (patch) | |
tree | c867139d120fc91b4bdc7f63ff2a90efb3f022d3 | |
parent | 5d45a26f39816c17459a3c71617cddcd3d19cea6 (diff) | |
download | tor-9c4a0aef0c0d8e1c3ad8d9ed7b655eae8a175ccb.tar.gz tor-9c4a0aef0c0d8e1c3ad8d9ed7b655eae8a175ccb.zip |
Fix a memory leak in reading an expired ed signing key.
Closes 17403.
-rw-r--r-- | changes/bug17403 | 3 | ||||
-rw-r--r-- | src/or/routerkeys.c | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/changes/bug17403 b/changes/bug17403 new file mode 100644 index 0000000000..e83a4a247b --- /dev/null +++ b/changes/bug17403 @@ -0,0 +1,3 @@ + o Minor bugfixes (memory leaks): + - Fix a memory leak when reading an expired signing key from disk. + Fixes bug 17403; bugfix on 0.2.7.2-rc. diff --git a/src/or/routerkeys.c b/src/or/routerkeys.c index 765dac883a..d88bfca13a 100644 --- a/src/or/routerkeys.c +++ b/src/or/routerkeys.c @@ -836,6 +836,8 @@ load_ed_keys(const or_options_t *options, time_t now) INIT_ED_KEY_INCLUDE_SIGNING_KEY_IN_CERT); char *fname = options_get_datadir_fname2(options, "keys", "ed25519_signing"); + ed25519_keypair_free(sign); + tor_cert_free(sign_cert); sign = ed_key_init_from_file(fname, flags, LOG_WARN, sign_signing_key_with_id, now, |