void http_stop(void) {
struct connection *conn;
+ struct connection *next;
unsigned int i;
free(http_base_url);
insocks = NULL;
/* Close in-flight connections. */
- LIST_FOREACH(conn, &connlist, entries) {
+ LIST_FOREACH_SAFE(conn, &connlist, entries, next) {
LIST_REMOVE(conn, entries);
free_connection(conn);
free(conn);