diff options
author | Roger Dingledine <arma@torproject.org> | 2017-05-24 23:14:23 -0400 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2017-05-24 23:32:32 -0400 |
commit | a7e75ff7966d7d3d83d41a47c5b9fa5e3daa2465 (patch) | |
tree | c82e4dfa4464149afd698475b82339246c64f64e /src/or/router.c | |
parent | 511c9006867926cbfcc824567b37e78856fa46d9 (diff) | |
download | tor-a7e75ff7966d7d3d83d41a47c5b9fa5e3daa2465.tar.gz tor-a7e75ff7966d7d3d83d41a47c5b9fa5e3daa2465.zip |
don't free the values in options->MyFamily when we make a descriptor
If we free them here, we will still attempt to access the freed memory
later on, and also we will double-free when we are freeing the config.
Fixes part of bug 22368.
Diffstat (limited to 'src/or/router.c')
-rw-r--r-- | src/or/router.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/or/router.c b/src/or/router.c index 642f415a38..b43742aa83 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -2289,7 +2289,7 @@ router_build_fresh_descriptor(routerinfo_t **r, extrainfo_t **e) char *name = family->value; const node_t *member; if (!strcasecmp(name, options->Nickname)) - goto skip; /* Don't list ourself, that's redundant */ + continue; /* Don't list ourself, that's redundant */ else member = node_get_by_nickname(name, 1); if (!member) { @@ -2323,8 +2323,6 @@ router_build_fresh_descriptor(routerinfo_t **r, extrainfo_t **e) if (smartlist_contains_string(warned_nonexistent_family, name)) smartlist_string_remove(warned_nonexistent_family, name); } - skip: - tor_free(name); } /* remove duplicates from the list */ |