mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
s4-drepl: Schedule event to trigger replication rather than calling run_pending_ops directly
Executing dreplsrv_run_pending_ops() directly may cause a segfault as in case of failure, the _drepl_replica_sync_done_cb() callback gets called *before* drepl_replica_sync() returns. In such case, irpc message gets freed twice - once when irpc_send_reply() gets called and once when drepl_replica_sync() returns
This commit is contained in:
parent
05c90d2fa6
commit
1ca2ec1188
@ -324,8 +324,11 @@ static NTSTATUS drepl_replica_sync(struct irpc_message *msg,
|
||||
/* if we got here, everything is OK */
|
||||
r->out.result = WERR_OK;
|
||||
|
||||
/* force execution of scheduled replications */
|
||||
dreplsrv_run_pending_ops(service);
|
||||
/*
|
||||
* schedule replication event to force
|
||||
* replication as soon as possible
|
||||
*/
|
||||
dreplsrv_periodic_schedule(service, 0);
|
||||
|
||||
done:
|
||||
return NT_STATUS_OK;
|
||||
|
Loading…
x
Reference in New Issue
Block a user