mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
smbd: check for conn->cwd_fsp in file_free()
This avoids doing the check in all callers. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
6ab75d2c62
commit
a929644b28
@ -591,6 +591,10 @@ void file_free(struct smb_request *req, files_struct *fsp)
|
||||
struct smbd_server_connection *sconn = fsp->conn->sconn;
|
||||
uint64_t fnum = fsp->fnum;
|
||||
|
||||
if (fsp == fsp->conn->cwd_fsp) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (fsp->notify) {
|
||||
size_t len = fsp_fullbasepath(fsp, NULL, 0);
|
||||
char fullpath[len+1];
|
||||
|
Loading…
x
Reference in New Issue
Block a user