From cfc10f2a83b7c6190742498f1027256215cd0b31 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 14 Jan 2005 01:21:56 +0000 Subject: r4727: add a reference to the event context to that the destructor don't double free the registered events when the event context is first in the talloc_free() hierarchie fixes a bug with process_model_thread and the talloc_steal(conn, ev) metze (This used to be commit 05c3d1c4a6a6350cc8b5fb2ee8201ae6feed3d3d) --- source4/lib/messaging/messaging.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/messaging') diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index 6975f45c8e..84c9adc874 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -514,7 +514,7 @@ struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx, servid_t server_id fde.flags = EVENT_FD_READ; fde.handler = messaging_listen_handler; - msg->event.ev = ev; + msg->event.ev = talloc_reference(msg,ev); msg->event.fde = event_add_fd(ev, &fde); talloc_set_destructor(msg, messaging_destructor); -- cgit