summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-11-26 17:05:30 -0500
committerNick Mathewson <nickm@torproject.org>2017-12-11 16:06:00 -0500
commit472473ec5d1a49b852b2f20fd7b0ed3350877cd2 (patch)
tree0bc5f0128db0bfd09b1a4ef54c32503b5e536646
parenta7e777ab8ef6063f3811be58e152269ad38b9143 (diff)
downloadtor-472473ec5d1a49b852b2f20fd7b0ed3350877cd2.tar.gz
tor-472473ec5d1a49b852b2f20fd7b0ed3350877cd2.zip
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.
-rw-r--r--src/or/transports.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/or/transports.c b/src/or/transports.c
index 68d1354844..5fb24e11a0 100644
--- a/src/or/transports.c
+++ b/src/or/transports.c
@@ -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);