smbd_add_connection() may return a valid connection together with
NT_STATUS_NETWORK_ACCESS_DENIED.
We need additional cleanup for that case.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11898
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
sock_fd,
pass_info0->initial_connect_time,
&xconn);
+ if (NT_STATUS_EQUAL(status, NT_STATUS_NETWORK_ACCESS_DENIED)) {
+ DLIST_REMOVE(client->connections, xconn);
+ TALLOC_FREE(xconn);
+ }
if (!NT_STATUS_IS_OK(status)) {
close(sock_fd);
sock_fd = -1;