mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
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.
This commit is contained in:
parent
511c900686
commit
a7e75ff796
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user