summaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-05-28 12:47:31 -0400
committerNick Mathewson <nickm@torproject.org>2015-05-28 12:47:31 -0400
commita85d58af62b04f37e16e2840e77e7f158a9586fc (patch)
treebc5570807ab744e41b171e8ad9261cf5487327eb /src/or/router.c
parent24a2bb08abb08e03de8ff962167179cdb4659ed2 (diff)
downloadtor-a85d58af62b04f37e16e2840e77e7f158a9586fc.tar.gz
tor-a85d58af62b04f37e16e2840e77e7f158a9586fc.zip
Fix memory leak on failure to generate EI. CID 1301370.
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 6532f97d24..6868e7b996 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;
}