[tor-commits] [tor/master] Fix a memory leak when adding an ri with expired ed certs

nickm at torproject.org nickm at torproject.org
Wed Aug 12 17:36:04 UTC 2015


commit 9deb3c61feb85563aeb336fec97fa3845a193f08
Author: Nick Mathewson <nickm at torproject.org>
Date:   Wed Aug 12 12:27:45 2015 -0400

    Fix a memory leak when adding an ri with expired ed certs
    
    Fixes bug 16539; bugfix on 0.2.7.2-alpha.
---
 changes/bug16539    |    4 ++++
 src/or/routerlist.c |    2 ++
 2 files changed, 6 insertions(+)

diff --git a/changes/bug16539 b/changes/bug16539
new file mode 100644
index 0000000..8a0b6d2
--- /dev/null
+++ b/changes/bug16539
@@ -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.
+      
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index dc48862..aebbd48 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -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;
   }
 





More information about the tor-commits mailing list