diff options
-rw-r--r-- | source4/lib/messaging/messaging.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index 2da0acc0c7a..b8d4e50f12c 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -391,6 +391,10 @@ struct imessaging_context *imessaging_init(TALLOC_CTX *mem_ctx, tdb_flags |= lpcfg_tdb_flags(lp_ctx, 0); + /* + * This context holds a destructor that cleans up any names + * registered on this context on talloc_free() + */ msg->names = server_id_db_init(msg, server_id, lock_dir, 0, tdb_flags); if (msg->names == NULL) { goto fail; @@ -767,6 +771,9 @@ static int irpc_destructor(struct irpc_request *irpc) /* add a string name that this irpc server can be called on + + It will be removed from the DB either via irpc_remove_name or on + talloc_free(msg_ctx->names). */ NTSTATUS irpc_add_name(struct imessaging_context *msg_ctx, const char *name) { |