mirror of
https://github.com/samba-team/samba.git
synced 2025-03-20 22:50:26 +03:00
r13748: Don't reference memory after we just freed it (Doh!).
Thanks to tridge's changes to the directory delete on close tests for catching this. Jeremy. (This used to be commit 01ef957d4846191071f95393e6e76e48d4c6aa24)
This commit is contained in:
parent
ddf14cc286
commit
99b74908cd
@ -363,8 +363,6 @@ static int close_directory(files_struct *fsp, enum file_close_type close_type)
|
||||
|
||||
delete_dir = (lck->delete_on_close | lck->initial_delete_on_close);
|
||||
|
||||
TALLOC_FREE(lck);
|
||||
|
||||
if ((close_type == NORMAL_CLOSE || close_type == SHUTDOWN_CLOSE) &&
|
||||
delete_dir &&
|
||||
lck->delete_token) {
|
||||
@ -382,6 +380,8 @@ static int close_directory(files_struct *fsp, enum file_close_type close_type)
|
||||
lck->delete_token->groups,
|
||||
NULL);
|
||||
|
||||
TALLOC_FREE(lck);
|
||||
|
||||
ok = rmdir_internals(fsp->conn, fsp->fsp_name);
|
||||
|
||||
DEBUG(5,("close_directory: %s. Delete on close was set - deleting directory %s.\n",
|
||||
@ -402,6 +402,7 @@ static int close_directory(files_struct *fsp, enum file_close_type close_type)
|
||||
}
|
||||
process_pending_change_notify_queue((time_t)0);
|
||||
} else {
|
||||
TALLOC_FREE(lck);
|
||||
remove_pending_change_notify_requests_by_fid(fsp, NT_STATUS_CANCELLED);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user