1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

Deferred attach: create the timed event as a child context of the da context we want to delete.

Othwervise the da context can be timed out and talloc_free()d
but the event for this already freed object will still trigger,
causing a talloc error and shutdown.

CQ S1022515

(This used to be ctdb commit 2fd27bdedb1e0d6558c07e1b74fc8e70ddf593dc)
This commit is contained in:
Ronnie Sahlberg 2011-03-16 14:55:58 +11:00 committed by Ronnie Sahlberg
parent f82936402f
commit cee8c4be94

View File

@ -990,7 +990,7 @@ int ctdb_process_deferred_attach(struct ctdb_context *ctdb)
*/
while ((da_ctx = ctdb->deferred_attach) != NULL) {
DLIST_REMOVE(ctdb->deferred_attach, da_ctx);
event_add_timed(ctdb->ev, ctdb, timeval_current_ofs(1,0), ctdb_deferred_attach_callback, da_ctx);
event_add_timed(ctdb->ev, da_ctx, timeval_current_ofs(1,0), ctdb_deferred_attach_callback, da_ctx);
}
return 0;