diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2011-06-08 21:38:42 +0200 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2011-06-08 21:38:42 +0200 |
commit | 82837673655151609462d529986a310e04f1ba50 (patch) | |
tree | 00c7eac3b8e5081aff5ba291791f4cdbdc1a197b /src/or/nodelist.c | |
parent | 3033f8459b332c934b3098ee15c3aa04e3545484 (diff) | |
download | tor-82837673655151609462d529986a310e04f1ba50.tar.gz tor-82837673655151609462d529986a310e04f1ba50.zip |
Fix a memleak in nodelist_assert_ok()
Diffstat (limited to 'src/or/nodelist.c')
-rw-r--r-- | src/or/nodelist.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/nodelist.c b/src/or/nodelist.c index 0856b3117c..8cded8f17d 100644 --- a/src/or/nodelist.c +++ b/src/or/nodelist.c @@ -342,11 +342,13 @@ nodelist_assert_ok(void) { routerlist_t *rl = router_get_routerlist(); networkstatus_t *ns = networkstatus_get_latest_consensus(); - digestmap_t *dm = digestmap_new(); + digestmap_t *dm; if (!the_nodelist) return; + dm = digestmap_new(); + /* every routerinfo in rl->routers should be in the nodelist. */ if (rl) { SMARTLIST_FOREACH_BEGIN(rl->routers, routerinfo_t *, ri) { |