s4:rpc_server: fix talloc hierachie dcesrv_context => dcesrv_endpoint => dcesrv_if_list
authorStefan Metzmacher <metze@samba.org>
Thu, 6 Feb 2014 17:59:53 +0000 (18:59 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 11 Feb 2014 15:20:31 +0000 (16:20 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source4/rpc_server/dcerpc_server.c

index bf1b577668e3a00612d3d3181bc99592fff23bf7..bf91529ae1e792cd6a1a4db48f0a2a7a899e9bc7 100644 (file)
@@ -262,11 +262,11 @@ _PUBLIC_ NTSTATUS dcesrv_interface_register(struct dcesrv_context *dce_ctx,
                        return NT_STATUS_NO_MEMORY;
                }
                ZERO_STRUCTP(ep);
-               ep->ep_description = talloc_reference(ep, binding);
+               ep->ep_description = talloc_move(ep, &binding);
                add_ep = true;
 
                /* add mgmt interface */
-               ifl = talloc(dce_ctx, struct dcesrv_if_list);
+               ifl = talloc(ep, struct dcesrv_if_list);
                if (!ifl) {
                        return NT_STATUS_NO_MEMORY;
                }
@@ -285,7 +285,7 @@ _PUBLIC_ NTSTATUS dcesrv_interface_register(struct dcesrv_context *dce_ctx,
        }
 
        /* talloc a new interface list element */
-       ifl = talloc(dce_ctx, struct dcesrv_if_list);
+       ifl = talloc(ep, struct dcesrv_if_list);
        if (!ifl) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -301,7 +301,7 @@ _PUBLIC_ NTSTATUS dcesrv_interface_register(struct dcesrv_context *dce_ctx,
                 * we try to set it
                 */
                if (ep->sd == NULL) {
-                       ep->sd = security_descriptor_copy(dce_ctx, sd);
+                       ep->sd = security_descriptor_copy(ep, sd);
                }
 
                /* if now there's no security descriptor given on the endpoint