On failure to create extend info for an introduction point, don't leak.

This is CID 1438152.  No backport needed: this path is already
inside a BUG() guard.
This commit is contained in:
Nick Mathewson 2019-04-11 17:35:19 -04:00
parent adeecce53b
commit 7c98105d56

View File

@ -4227,6 +4227,7 @@ rend_consider_services_intro_points(time_t now)
* directly ourselves. */ * directly ourselves. */
intro->extend_info = extend_info_from_node(node, 0); intro->extend_info = extend_info_from_node(node, 0);
if (BUG(intro->extend_info == NULL)) { if (BUG(intro->extend_info == NULL)) {
tor_free(intro);
break; break;
} }
intro->intro_key = crypto_pk_new(); intro->intro_key = crypto_pk_new();