rpcrt4: Fix a memory leak caused by NdrFullPointerXlatFree not freeing the entries in the full pointer translation table.

This commit is contained in:
Rob Shearman 2007-12-05 22:41:03 +00:00 committed by Alexandre Julliard
parent 867cc3c05f
commit 1b79da8be0
1 changed files with 6 additions and 0 deletions

View File

@ -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);