Browse Source

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.
Nick Mathewson 6 years ago
parent
commit
472473ec5d
1 changed files with 0 additions and 4 deletions
  1. 0 4
      src/or/transports.c

+ 0 - 4
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);