diff options
Diffstat (limited to 'librpc/ndr/ndr_table.c')
-rw-r--r-- | librpc/ndr/ndr_table.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/librpc/ndr/ndr_table.c b/librpc/ndr/ndr_table.c index 3dc158fa7ea..f64e5ac4d20 100644 --- a/librpc/ndr/ndr_table.c +++ b/librpc/ndr/ndr_table.c @@ -44,7 +44,17 @@ NTSTATUS ndr_table_register(const struct ndr_interface_table *table) } } - l = talloc(talloc_autofree_context(), struct ndr_interface_list); + /* + * This is a singleton instance guarenteed + * by the above check to be only added once + * into the list so we can allocate off the NULL + * context. We never want this to be freed + * until process shutdown. If needed we could + * add a deregister function that walks and + * frees the list. + */ + + l = talloc(NULL, struct ndr_interface_list); l->table = table; DLIST_ADD(ndr_interfaces, l); |