mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
s3: smbd: In dfs_filename_convert(), don't ask for hostname, sharename and then just free them.
Wastes a talloc/free. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
06750a9684
commit
b6afd481a4
@ -1128,8 +1128,6 @@ NTSTATUS dfs_filename_convert(TALLOC_CTX *ctx,
|
||||
const char *dfs_path_in,
|
||||
char **pp_path_out)
|
||||
{
|
||||
char *hostname = NULL;
|
||||
char *servicename = NULL;
|
||||
char *reqpath = NULL;
|
||||
NTSTATUS status;
|
||||
|
||||
@ -1137,20 +1135,13 @@ NTSTATUS dfs_filename_convert(TALLOC_CTX *ctx,
|
||||
conn,
|
||||
dfs_path_in,
|
||||
!conn->sconn->using_smb2,
|
||||
&hostname,
|
||||
&servicename,
|
||||
NULL, /* hostname */
|
||||
NULL, /* servicename */
|
||||
&reqpath);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
return status;
|
||||
}
|
||||
|
||||
/*
|
||||
* Caller doesn't care about hostname
|
||||
* or servicename.
|
||||
*/
|
||||
TALLOC_FREE(hostname);
|
||||
TALLOC_FREE(servicename);
|
||||
|
||||
/*
|
||||
* If parse_dfs_path fell back to a local path
|
||||
* after skipping hostname or servicename, ensure
|
||||
|
Loading…
x
Reference in New Issue
Block a user