]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a memory leak when adding an ri with expired ed certs
authorNick Mathewson <nickm@torproject.org>
Wed, 12 Aug 2015 16:27:45 +0000 (12:27 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 12 Aug 2015 16:27:45 +0000 (12:27 -0400)
Fixes bug 16539; bugfix on 0.2.7.2-alpha.

changes/bug16539 [new file with mode: 0644]
src/or/routerlist.c

diff --git a/changes/bug16539 b/changes/bug16539
new file mode 100644 (file)
index 0000000..8a0b6d2
--- /dev/null
@@ -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.
+      
index dc48862201af98b4679bcdf638bb8d00935c8716..aebbd480d2b23a81c7d4c79d945c16bd96825a89 100644 (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;
   }