Merge remote branch 'sebastian/coverity'

This commit is contained in:
Nick Mathewson 2010-02-22 12:46:43 -05:00
commit 295e6557a9

View File

@ -2095,6 +2095,7 @@ 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;
} }
} }
@ -2109,6 +2110,8 @@ handle_control_extendcircuit(control_connection_t *conn, uint32_t len,
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);
} }
SMARTLIST_FOREACH(args, char *, cp, tor_free(cp));
smartlist_free(args);
goto done; goto done;
} }
// "EXTENDCIRCUIT 0 router1,router2" || // "EXTENDCIRCUIT 0 router1,router2" ||
@ -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,