diff options
Diffstat (limited to 'source3')
| -rw-r--r-- | source3/librpc/rpc/dcerpc_ep.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source3/librpc/rpc/dcerpc_ep.c b/source3/librpc/rpc/dcerpc_ep.c index d0c264a5a8..99a88c4251 100644 --- a/source3/librpc/rpc/dcerpc_ep.c +++ b/source3/librpc/rpc/dcerpc_ep.c @@ -398,9 +398,17 @@ static NTSTATUS ep_register(TALLOC_CTX *mem_ctx, entries = talloc_array(tmp_ctx, struct epm_entry_t, num_ents); for (i = 0; i < num_ents; i++) { - struct dcerpc_binding *map_binding = bind_vec->bindings[i]; + struct dcerpc_binding *map_binding; struct epm_twr_t *map_tower; + map_binding = dcerpc_binding_dup(entries, bind_vec->bindings[i]); + if (map_binding == NULL) { + status = NT_STATUS_NO_MEMORY; + goto done; + } + + map_binding->object = iface->syntax_id; + map_tower = talloc_zero(entries, struct epm_twr_t); if (map_tower == NULL) { status = NT_STATUS_NO_MEMORY; @@ -414,6 +422,8 @@ static NTSTATUS ep_register(TALLOC_CTX *mem_ctx, goto done; } + TALLOC_FREE(map_binding); + entries[i].tower = map_tower; if (annotation == NULL) { entries[i].annotation = talloc_strdup(entries, ""); |
