On Jun 18, 2008, at 11:39, Janusz Dziemidowicz wrote:
Seems fine, but conn_new() does not set listen_conn->next and in
accept_new_conns() is this loop:
for (next = listen_conn; next; next = next->next) { ... }
so it depends on uninitialized memory.
I'll replace conn_new's malloc with calloc. Any objections?
I'm a big fan of calloc in general. Here, it seems like there are
two types of conn_new. One uses next and is somewhat rare. The other
is frequently (re)used, but doesn't. In either case, the allocation
should be rare.
--
Dustin Sallings