summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-01-14 01:21:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:08:49 -0500
commitcfc10f2a83b7c6190742498f1027256215cd0b31 (patch)
tree21810939d78cd5f39fe9735d5e3c1af1821c4fcb /source4/lib
parent592fce7fb149ca5e82b14d9c8f13a4da1babe2b7 (diff)
downloadsamba-cfc10f2a83b7c6190742498f1027256215cd0b31.tar.gz
samba-cfc10f2a83b7c6190742498f1027256215cd0b31.tar.bz2
samba-cfc10f2a83b7c6190742498f1027256215cd0b31.zip
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)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/messaging/messaging.c2
1 files changed, 1 insertions, 1 deletions
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);