Module: wine
Branch: refs/heads/master
Commit: a48433453bf54890a0829d72498839ba0fb69476
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=a48433453bf54890a0829d7…
Author: Robert Shearman <rob(a)codeweavers.com>
Date: Fri Jun 2 20:45:59 2006 +0100
rpcrt4: The lifetime of the binding handle stored in the context
handle is independent of the binding handle used in the call that
unmarshaled it, so we should use RpcBindingCopy to make a copy of it
and then call RpcBindingFree later to free it.
---
dlls/rpcrt4/ndr_marshall.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c
index 96e923c..02c3583 100644
--- a/dlls/rpcrt4/ndr_marshall.c
+++ b/dlls/rpcrt4/ndr_marshall.c
@@ -4516,6 +4516,7 @@ static UINT ndr_update_context_handle(ND
if (!che)
return ERROR_INVALID_HANDLE;
list_remove(&che->entry);
+ RpcBindingFree(&che->handle);
HeapFree(GetProcessHeap(), 0, che);
che = NULL;
}
@@ -4527,7 +4528,7 @@ static UINT ndr_update_context_handle(ND
if (!che)
return ERROR_NOT_ENOUGH_MEMORY;
che->magic = NDR_CONTEXT_HANDLE_MAGIC;
- che->handle = hBinding;
+ RpcBindingCopy(hBinding, &che->handle);
list_add_tail(&context_handle_list, &che->entry);
memcpy(&che->wire_data, chi, sizeof *chi);
}