Module: wine Branch: master Commit: 1b79da8be0b6097049a90a9b8d72a4aa14c50841 URL: http://source.winehq.org/git/wine.git/?a=commit;h=1b79da8be0b6097049a90a9b8d...
Author: Rob Shearman rob@codeweavers.com Date: Wed Dec 5 22:41:03 2007 +0000
rpcrt4: Fix a memory leak caused by NdrFullPointerXlatFree not freeing the entries in the full pointer translation table.
---
dlls/rpcrt4/ndr_fullpointer.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/dlls/rpcrt4/ndr_fullpointer.c b/dlls/rpcrt4/ndr_fullpointer.c index 5640769..3586bc3 100644 --- a/dlls/rpcrt4/ndr_fullpointer.c +++ b/dlls/rpcrt4/ndr_fullpointer.c @@ -63,8 +63,14 @@ PFULL_PTR_XLAT_TABLES WINAPI NdrFullPointerXlatInit(ULONG NumberOfPointers,
void WINAPI NdrFullPointerXlatFree(PFULL_PTR_XLAT_TABLES pXlatTables) { + ULONG i; + TRACE("(%p)\n", pXlatTables);
+ /* free the entries in the table */ + for (i = 0; i < pXlatTables->RefIdToPointer.NumberOfEntries; i++) + HeapFree(GetProcessHeap(), 0, pXlatTables->RefIdToPointer.XlatTable[i]); + HeapFree(GetProcessHeap(), 0, pXlatTables->RefIdToPointer.XlatTable); HeapFree(GetProcessHeap(), 0, pXlatTables->RefIdToPointer.StateTable); HeapFree(GetProcessHeap(), 0, pXlatTables->PointerToRefId.XlatTable);