diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-03-27 18:23:53 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-03-27 18:23:53 -0400 |
commit | c26fa05370b858035e5a8b92c21deb78dbc1f8ea (patch) | |
tree | f067193a42d62ee460aabd9018e6c2dd140974fa /src/or/nodelist.c | |
parent | 2a0865898552bd5ededf7338761b5d428c7073d1 (diff) | |
parent | 4bb7d9fd1241a3c263636efa03ee8c62ab744515 (diff) | |
download | tor-c26fa05370b858035e5a8b92c21deb78dbc1f8ea.tar.gz tor-c26fa05370b858035e5a8b92c21deb78dbc1f8ea.zip |
Merge branch 'maint-0.2.9' into release-0.2.9
Diffstat (limited to 'src/or/nodelist.c')
-rw-r--r-- | src/or/nodelist.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/or/nodelist.c b/src/or/nodelist.c index 5a02648c5c..26f990b08c 100644 --- a/src/or/nodelist.c +++ b/src/or/nodelist.c @@ -263,13 +263,12 @@ nodelist_add_microdesc(microdesc_t *md) if (rs == NULL) return NULL; node = node_get_mutable_by_id(rs->identity_digest); - if (node) { - if (node->md) - node->md->held_by_nodes--; - node->md = md; - md->held_by_nodes++; - } - + if (node == NULL) + return NULL; + if (node->md) + node->md->held_by_nodes--; + node->md = md; + md->held_by_nodes++; node_add_to_address_set(node); return node; |