From: Stefan Metzmacher Date: Thu, 25 Jun 2020 20:45:07 +0000 (+0200) Subject: s3:smbd: fill in xconn->client early in smbd_add_connection() X-Git-Tag: samba-4.13.0rc1~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=876a84493bb4c90edc01f49cdd332275383a8eb0;p=thirdparty%2Fsamba.git s3:smbd: fill in xconn->client early in smbd_add_connection() BUG: https://bugzilla.samba.org/show_bug.cgi?id=11898 Signed-off-by: Stefan Metzmacher Reviewed-by: Günther Deschner --- diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 008b1986150..651f72f33fc 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -3750,6 +3750,7 @@ NTSTATUS smbd_add_connection(struct smbXsrv_client *client, int sock_fd, return NT_STATUS_NO_MEMORY; } talloc_steal(frame, xconn); + xconn->client = client; xconn->connect_time = now; if (client->next_channel_id != 0) { xconn->channel_id = client->next_channel_id++; @@ -3867,7 +3868,6 @@ NTSTATUS smbd_add_connection(struct smbXsrv_client *client, int sock_fd, * to the client */ DLIST_ADD_END(client->connections, xconn); - xconn->client = client; talloc_steal(client, xconn); *_xconn = xconn; @@ -3917,7 +3917,6 @@ NTSTATUS smbd_add_connection(struct smbXsrv_client *client, int sock_fd, /* for now we only have one connection */ DLIST_ADD_END(client->connections, xconn); - xconn->client = client; talloc_steal(client, xconn); *_xconn = xconn;