----- Original Message ----- > > +out_err: > > + sock_release(sock); > > + sock = NULL; > > + con->sock = NULL; > > Consolidating the error paths makes sense, but con->sock shouldn't be > set here at all; the caller does that in add_sock(). > > Thanks, > Andreas >
Hi Andreas, I disagree. The caller doesn't call add_sock() in the error case, which is where we're setting con->sock to NULL. Instead, it returns -EADDRINUSE to its caller, dlm_lowcomms_start, which jumps to label fail_unlisten, which calls close_connection for the con if it finds it for nodeid 0, then it calls close_connection for it, which does some things if con->sock is not NULL. That path through the code is hard to follow, so maybe I'm wrong. Regards, Bob Peterson Red Hat File Systems