Allocate them off the NULL context not the talloc_autofree_context().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12932
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
}
}
- 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);