diff options
author | Volker Lendecke <vl@samba.org> | 2020-09-29 10:55:07 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2020-10-02 22:50:43 +0000 |
commit | 666d2a38fcf62eda3529ae21575381e43b2c046f (patch) | |
tree | aa8f7090e0de80bdb1a802473de80573d4056728 /libcli/smb/smbXcli_base.c | |
parent | 63ab004e38b24929b3f578e5db0574938c63aeb5 (diff) | |
download | samba-666d2a38fcf62eda3529ae21575381e43b2c046f.tar.gz |
libcli: Use GUID_to_ndr_buf() in smb2cli_validate_negotiate_info_send()
Avoid a talloc/free
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Oct 2 22:50:43 UTC 2020 on sn-devel-184
Diffstat (limited to 'libcli/smb/smbXcli_base.c')
-rw-r--r-- | libcli/smb/smbXcli_base.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c index 687a9896b48..96726458676 100644 --- a/libcli/smb/smbXcli_base.c +++ b/libcli/smb/smbXcli_base.c @@ -5327,14 +5327,14 @@ struct tevent_req *smb2cli_validate_negotiate_info_send(TALLOC_CTX *mem_ctx, } if (state->conn->max_protocol >= PROTOCOL_SMB2_10) { NTSTATUS status; - DATA_BLOB blob; + struct GUID_ndr_buf guid_buf = { .buf = {0}, }; - status = GUID_to_ndr_blob(&conn->smb2.client.guid, - state, &blob); + status = GUID_to_ndr_buf(&conn->smb2.client.guid, + &guid_buf); if (!NT_STATUS_IS_OK(status)) { return NULL; } - memcpy(buf+4, blob.data, 16); /* ClientGuid */ + memcpy(buf+4, guid_buf.buf, 16); /* ClientGuid */ } else { memset(buf+4, 0, 16); /* ClientGuid */ } |