r67: added a destroy hook in the policy handle -> wire handle code to allow backends
[samba.git] / source4 / rpc_server / dcerpc_server.c
index a17910e1d5e0975c3ea43efbe2a75283c00d034c..2d448f61de589bc57f3aa5da9ee4c78f1c2431be 100644 (file)
@@ -315,9 +315,7 @@ void dcesrv_endpoint_disconnect(struct dcesrv_connection *p)
 
        /* destroy any handles */
        while (p->handles) {
-               TALLOC_CTX *m = p->handles->mem_ctx;
-               DLIST_REMOVE(p->handles, p->handles);
-               talloc_destroy(m);
+               dcesrv_handle_destroy(p, p->handles);
        }
        
        talloc_destroy(p->mem_ctx);