1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

libsmb: Slightly simplify cli_smb2_create_fnum_send()

We can now write to fname directly.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2022-12-15 19:10:09 +01:00
parent c64c8af6d4
commit 833cb4cb81

View File

@ -288,12 +288,7 @@ struct tevent_req *cli_smb2_create_fnum_send(
/* Or end in a '\' */
if (fname_len > 0 && fname[fname_len-1] == '\\') {
char *new_fname = talloc_strdup(state, fname);
if (tevent_req_nomem(new_fname, req)) {
return tevent_req_post(req, ev);
}
new_fname[fname_len-1] = '\0';
fname = new_fname;
fname[fname_len-1] = '\0';
}
subreq = smb2cli_create_send(state, ev,