summaryrefslogtreecommitdiff
path: root/source4/rpc_server/epmapper
diff options
context:
space:
mode:
Diffstat (limited to 'source4/rpc_server/epmapper')
-rw-r--r--source4/rpc_server/epmapper/rpc_epmapper.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/rpc_server/epmapper/rpc_epmapper.c b/source4/rpc_server/epmapper/rpc_epmapper.c
index 37f1c372e0..54a996e82a 100644
--- a/source4/rpc_server/epmapper/rpc_epmapper.c
+++ b/source4/rpc_server/epmapper/rpc_epmapper.c
@@ -123,13 +123,14 @@ static uint32_t build_ep_list(TALLOC_CTX *mem_ctx,
struct dcesrv_endpoint *d;
uint32_t total = 0;
- (*eps) = talloc(mem_ctx, 0);
-
+ *eps = NULL;
+
for (d=endpoint_list; d; d=d->next) {
struct dcesrv_if_list *iface;
for (iface=d->interface_list;iface;iface=iface->next) {
- (*eps) = talloc_realloc_p(*eps,
+ (*eps) = talloc_realloc_p(mem_ctx,
+ *eps,
struct dcesrv_ep_iface,
total + 1);
if (!*eps) {