transport_new() cannot fail; do not check for it to fail.

(It can't fail because the tor_malloc*() family of functions can
never return NULL)

Found with STACK.
This commit is contained in:
Nick Mathewson 2017-11-26 17:05:30 -05:00
parent a7e777ab8e
commit 472473ec5d

View File

@ -1094,8 +1094,6 @@ parse_smethod_line(const char *line, managed_proxy_t *mp)
transport = transport_new(&tor_addr, port, method_name,
PROXY_NONE, args_string);
if (!transport)
goto err;
smartlist_add(mp->transports, transport);
@ -1186,8 +1184,6 @@ parse_cmethod_line(const char *line, managed_proxy_t *mp)
}
transport = transport_new(&tor_addr, port, method_name, socks_ver, NULL);
if (!transport)
goto err;
smartlist_add(mp->transports, transport);