mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-13 06:33:44 +01:00
Merge remote branch 'sebastian/coverity'
This commit is contained in:
commit
295e6557a9
@ -2095,21 +2095,24 @@ handle_control_extendcircuit(control_connection_t *conn, uint32_t len,
|
|||||||
connection_printf_to_buf(conn, "552 Unknown purpose \"%s\"\r\n", purp);
|
connection_printf_to_buf(conn, "552 Unknown purpose \"%s\"\r\n", purp);
|
||||||
SMARTLIST_FOREACH(args, char *, cp, tor_free(cp));
|
SMARTLIST_FOREACH(args, char *, cp, tor_free(cp));
|
||||||
smartlist_free(args);
|
smartlist_free(args);
|
||||||
|
goto done;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((smartlist_len(args) == 1) ||
|
if ((smartlist_len(args) == 1) ||
|
||||||
(smartlist_len(args) >= 2 && is_keyval_pair(smartlist_get(args, 1)))) {
|
(smartlist_len(args) >= 2 && is_keyval_pair(smartlist_get(args, 1)))) {
|
||||||
// "EXTENDCIRCUIT 0" || EXTENDCIRCUIT 0 foo=bar"
|
// "EXTENDCIRCUIT 0" || EXTENDCIRCUIT 0 foo=bar"
|
||||||
circ = circuit_launch_by_router(intended_purpose, NULL,
|
circ = circuit_launch_by_router(intended_purpose, NULL,
|
||||||
CIRCLAUNCH_NEED_CAPACITY);
|
CIRCLAUNCH_NEED_CAPACITY);
|
||||||
if (!circ) {
|
if (!circ) {
|
||||||
connection_write_str_to_buf("551 Couldn't start circuit\r\n", conn);
|
connection_write_str_to_buf("551 Couldn't start circuit\r\n", conn);
|
||||||
} else {
|
} else {
|
||||||
connection_printf_to_buf(conn, "250 EXTENDED %lu\r\n",
|
connection_printf_to_buf(conn, "250 EXTENDED %lu\r\n",
|
||||||
(unsigned long)circ->global_identifier);
|
(unsigned long)circ->global_identifier);
|
||||||
}
|
}
|
||||||
goto done;
|
SMARTLIST_FOREACH(args, char *, cp, tor_free(cp));
|
||||||
|
smartlist_free(args);
|
||||||
|
goto done;
|
||||||
}
|
}
|
||||||
// "EXTENDCIRCUIT 0 router1,router2" ||
|
// "EXTENDCIRCUIT 0 router1,router2" ||
|
||||||
// "EXTENDCIRCUIT 0 router1,router2 PURPOSE=foo"
|
// "EXTENDCIRCUIT 0 router1,router2 PURPOSE=foo"
|
||||||
@ -2125,9 +2128,6 @@ handle_control_extendcircuit(control_connection_t *conn, uint32_t len,
|
|||||||
|
|
||||||
SMARTLIST_FOREACH(args, char *, cp, tor_free(cp));
|
SMARTLIST_FOREACH(args, char *, cp, tor_free(cp));
|
||||||
smartlist_free(args);
|
smartlist_free(args);
|
||||||
if (!zero_circ && !circ) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
routers = smartlist_create();
|
routers = smartlist_create();
|
||||||
SMARTLIST_FOREACH(router_nicknames, const char *, n,
|
SMARTLIST_FOREACH(router_nicknames, const char *, n,
|
||||||
|
Loading…
Reference in New Issue
Block a user