Hi,

I am trying to allocate heaps of memory and keep on getting memory leaks. HeapAlloc() works, but VirtualAlloc() gives leaks:

Code:
				LPSTR pRead = (LPSTR)VirtualAlloc(NULL, config.dwSendHeap+1, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
					VirtualFree(pRead, config.dwSendHeap+1, MEM_DECOMMIT | MEM_RELEASE);
Anyone can help to trace the leak?

Thanks.