summaryrefslogtreecommitdiff
path: root/source3/utils/net_vfs.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2022-02-01 17:47:29 +0100
committerJeremy Allison <jra@samba.org>2022-02-10 18:16:36 +0000
commitf5bc73a2ad97647f76143f7962c964f45aa6b1a0 (patch)
tree2673b73dbf0b2c6efa1e3a2471605eb8fdd34106 /source3/utils/net_vfs.c
parent363ac7533895fda786f56c4fe8346128753f38a5 (diff)
downloadsamba-f5bc73a2ad97647f76143f7962c964f45aa6b1a0.tar.gz
smbd: NULL out "fsp" in close_file()
Quite a few places already had this in the caller, but not all. Rename close_file() to close_file_free() appropriately. We'll factor out close_file_smb() doing only parts of close_file_free() later. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/utils/net_vfs.c')
-rw-r--r--source3/utils/net_vfs.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source3/utils/net_vfs.c b/source3/utils/net_vfs.c
index 73eda3e5cda..53e4583af39 100644
--- a/source3/utils/net_vfs.c
+++ b/source3/utils/net_vfs.c
@@ -283,23 +283,22 @@ static int net_vfs_get_ntacl(struct net_context *net,
goto done;
}
- status = close_file(NULL, fsp, NORMAL_CLOSE);
+ status = close_file_free(NULL, &fsp, NORMAL_CLOSE);
if (!NT_STATUS_IS_OK(status)) {
DBG_ERR("close_file [%s] failed: %s\n",
smb_fname_str_dbg(smb_fname),
nt_errstr(status));
goto done;
}
- fsp = NULL;
sec_desc_print(NULL, stdout, sd, true);
rc = 0;
done:
if (fsp != NULL) {
- status = close_file(NULL, fsp, NORMAL_CLOSE);
+ status = close_file_free(NULL, &fsp, NORMAL_CLOSE);
if (!NT_STATUS_IS_OK(status)) {
- DBG_ERR("close_file [%s] failed: %s\n",
+ DBG_ERR("close_file_free() [%s] failed: %s\n",
smb_fname_str_dbg(smb_fname),
nt_errstr(status));
rc = 1;