exit_server_common() can be called also in smbd processes without a
smbXsrv_client structure, e.g. the parent or some background tasks.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jul 26 01:29:38 CEST 2018 on sn-devel-144
if (client != NULL) {
sconn = client->sconn;
+ xconn = client->connections;
}
if (!exit_firsttime)
/*
* Here we typically have just one connection
*/
- for (xconn = client->connections; xconn != NULL; xconn = xconn_next) {
+ for (; xconn != NULL; xconn = xconn_next) {
xconn_next = xconn->next;
DLIST_REMOVE(client->connections, xconn);