summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-03-24 14:39:56 +0100
committerSimo Sorce <idra@samba.org>2011-03-24 14:57:12 -0400
commit5ebf0072336ece5acf120bcdeb6612445fa059f1 (patch)
treeeb800cd87e9aae7ca6e131d9ac4a2131da941f9f /source3/rpc_server
parentf534dcdca3184a342df2d702663088a4afba6571 (diff)
downloadsamba-5ebf0072336ece5acf120bcdeb6612445fa059f1.tar.gz
samba-5ebf0072336ece5acf120bcdeb6612445fa059f1.tar.bz2
samba-5ebf0072336ece5acf120bcdeb6612445fa059f1.zip
s3-epmapper: Make sure we work on a description duplicate.
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/epmapper/srv_epmapper.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/rpc_server/epmapper/srv_epmapper.c b/source3/rpc_server/epmapper/srv_epmapper.c
index 2e3e5d2173..f7f3617f15 100644
--- a/source3/rpc_server/epmapper/srv_epmapper.c
+++ b/source3/rpc_server/epmapper/srv_epmapper.c
@@ -192,7 +192,10 @@ static uint32_t build_ep_list(TALLOC_CTX *mem_ctx,
iface->iface->name);
eps[total].syntax_id = iface->iface->syntax_id;
- description = d->ep_description;
+ description = dcerpc_binding_dup(mem_ctx, d->ep_description);
+ if (description == NULL) {
+ return 0;
+ }
description->object = iface->iface->syntax_id;
if (description->transport == NCACN_IP_TCP &&
srv_addr != NULL &&
@@ -204,6 +207,7 @@ static uint32_t build_ep_list(TALLOC_CTX *mem_ctx,
status = dcerpc_binding_build_tower(eps,
description,
&eps[total].ep);
+ TALLOC_FREE(description);
if (NT_STATUS_IS_ERR(status)) {
DEBUG(1, ("Unable to build tower for %s\n",
iface->iface->name));