[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/release-0.3.2] transport_new() cannot fail; do not check for it to fail.
commit 472473ec5d1a49b852b2f20fd7b0ed3350877cd2
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Sun Nov 26 17:05:30 2017 -0500
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.
---
src/or/transports.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/or/transports.c b/src/or/transports.c
index 68d135484..5fb24e11a 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);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits