1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-02 09:47:23 +03:00

s3: smbd: In create_conn_struct_cwd(), don't TALLOC_FREE() an unallocated pointer on error.

Just return the status - if create_conn_struct_as_root() fails
the connection struct never gets returned.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14809

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Aug 25 17:09:23 UTC 2021 on sn-devel-184
This commit is contained in:
Jeremy Allison 2021-08-23 17:42:40 -07:00 committed by Ralph Boehme
parent b4d8c62c4e
commit 857045f3a2

View File

@ -525,12 +525,7 @@ NTSTATUS create_conn_struct_cwd(TALLOC_CTX *mem_ctx,
path,
session_info);
unbecome_root();
if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(c);
return status;
}
return NT_STATUS_OK;
return status;
}
static void shuffle_strlist(char **list, int count)