diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-10-16 20:38:57 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-10-16 20:38:57 +0000 |
commit | a42adce3628c9b82c91ff21e85c6a2d4fbcefc13 (patch) | |
tree | b7f04f7a405e5638f21ad1fd86d77e216e517d75 /src/or/router.c | |
parent | b0afd91afec362e3edc58d1928d2a63bcb3097e8 (diff) | |
download | tor-a42adce3628c9b82c91ff21e85c6a2d4fbcefc13.tar.gz tor-a42adce3628c9b82c91ff21e85c6a2d4fbcefc13.zip |
fix memory leak in router.c; start relying on NULL==(zero bytes)
svn:r2538
Diffstat (limited to 'src/or/router.c')
-rw-r--r-- | src/or/router.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/or/router.c b/src/or/router.c index ab606ee69b..26a4b97f6d 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -547,7 +547,6 @@ int router_rebuild_descriptor(void) { ri->bandwidthrate = options.BandwidthRate; ri->bandwidthburst = options.BandwidthBurst; ri->bandwidthcapacity = router_get_bandwidth_capacity(); - ri->exit_policy = NULL; /* zero it out first */ router_add_exit_policy_from_config(ri); ri->is_trusted_dir = authdir_mode(); if(desc_routerinfo) /* inherit values */ @@ -556,8 +555,6 @@ int router_rebuild_descriptor(void) { ri->declared_family = smartlist_create(); smartlist_split_string(ri->declared_family, options.MyFamily, ",", SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, 0); - } else { - ri->declared_family = NULL; } if (desc_routerinfo) @@ -684,7 +681,7 @@ int router_dump_router_to_string(char *s, size_t maxlen, routerinfo_t *router, (int) router->bandwidthcapacity, onion_pkey, identity_pkey, family_line, bandwidth_usage); - + tor_free(family_line); tor_free(onion_pkey); tor_free(identity_pkey); tor_free(bandwidth_usage); |