summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2022-12-15 19:10:09 +0100
committerVolker Lendecke <vl@samba.org>2022-12-16 07:42:38 +0000
commit833cb4cb8126dcbee914551bcd2e852cec67786c (patch)
tree56716c54a83bd0d503bbbdc23df71a19e00bde67 /source3
parentc64c8af6d4b121b0fa7ebe13b5c7c28ee9cc8053 (diff)
downloadsamba-833cb4cb8126dcbee914551bcd2e852cec67786c.tar.gz
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>
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/cli_smb2_fnum.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c
index 6db9fca612c..734c24531d9 100644
--- a/source3/libsmb/cli_smb2_fnum.c
+++ b/source3/libsmb/cli_smb2_fnum.c
@@ -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,