[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Fix memory leak on failure to generate EI. CID 1301370.



commit a85d58af62b04f37e16e2840e77e7f158a9586fc
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Thu May 28 12:47:31 2015 -0400

    Fix memory leak on failure to generate EI. CID 1301370.
---
 src/or/router.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/or/router.c b/src/or/router.c
index 6532f97..6868e7b 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -2882,7 +2882,6 @@ extrainfo_dump_to_string(char **s_out, extrainfo_t *extrainfo,
                extrainfo->nickname, identity,
                ed_cert_line,
                published, bandwidth_usage);
-  tor_free(bandwidth_usage);
   smartlist_add(chunks, pre);
 
   if (geoip_is_loaded(AF_INET))
@@ -3030,6 +3029,7 @@ extrainfo_dump_to_string(char **s_out, extrainfo_t *extrainfo,
   tor_free(s_dup);
   tor_free(ed_cert_line);
   extrainfo_free(ei_tmp);
+  tor_free(bandwidth_usage);
 
   return result;
 }



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits