diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-01-10 14:13:45 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-01-30 08:37:26 -0500 |
commit | 143235873ba0229f83ce69c4247ba8d3c459629f (patch) | |
tree | e0a7bcd6e7e01bcd783e1aa1207cb049e3ea2908 /src | |
parent | 34fd6368708daec4c6af2b93d69d5ed774ac7c47 (diff) | |
download | tor-143235873ba0229f83ce69c4247ba8d3c459629f.tar.gz tor-143235873ba0229f83ce69c4247ba8d3c459629f.zip |
Memory leak on bogus ed key in microdesc
Diffstat (limited to 'src')
-rw-r--r-- | src/or/routerparse.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 8cdeb45b7f..58b9a22438 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -4717,11 +4717,13 @@ microdescs_parse_from_string(const char *s, const char *eos, if (!strcmp(t->args[0], "ed25519")) { if (md->ed25519_identity_pkey) { log_warn(LD_DIR, "Extra ed25519 key in microdesc"); + smartlist_free(id_lines); goto next; } ed25519_public_key_t k; if (ed25519_public_from_base64(&k, t->args[1])<0) { log_warn(LD_DIR, "Bogus ed25519 key in microdesc"); + smartlist_free(id_lines); goto next; } md->ed25519_identity_pkey = tor_memdup(&k, sizeof(k)); |