mirror of
https://github.com/samba-team/samba.git
synced 2025-01-24 02:04:21 +03:00
smbd: Avoid a reference to share_mode_data->num_share_modes
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
21eff9d18d
commit
5a2fa45741
@ -2178,6 +2178,12 @@ static void mark_share_mode_disconnected_fn(
|
||||
void *private_data)
|
||||
{
|
||||
struct mark_share_mode_disconnected_state *state = private_data;
|
||||
|
||||
if (num_share_modes != 1) {
|
||||
state->ok = false;
|
||||
return;
|
||||
}
|
||||
|
||||
server_id_set_disconnected(&e->pid);
|
||||
e->share_file_id = state->open_persistent_id;
|
||||
*modified = true;
|
||||
@ -2190,10 +2196,6 @@ bool mark_share_mode_disconnected(struct share_mode_lock *lck,
|
||||
struct mark_share_mode_disconnected_state state;
|
||||
bool ok;
|
||||
|
||||
if (lck->data->num_share_modes != 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (fsp->op == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user