Fix a memory leak when adding an ri with expired ed certs

Fixes bug 16539; bugfix on 0.2.7.2-alpha.
This commit is contained in:
Nick Mathewson 2015-08-12 12:27:45 -04:00
parent 23fb084cb2
commit 9deb3c61fe
2 changed files with 6 additions and 0 deletions

4
changes/bug16539 Normal file
View File

@ -0,0 +1,4 @@
o Minor bugfixes (Ed25519):
- Fix a memory leak when reading router descriptors with
expired Ed25519 certificate. Fixes bug 16539; bugfix on 0.2.7.2-alpha.

View File

@ -3295,6 +3295,8 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg,
/* Make sure that it isn't expired. */
if (router->cert_expiration_time < approx_time()) {
routerinfo_free(router);
*msg = "Some certs on this router are expired.";
return ROUTER_CERTS_EXPIRED;
}