summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);