[4/6] wsdapi: Implement "Hello" message creation support.
Vincent Povirk
madewokherd at gmail.com
Thu Jul 27 16:11:49 CDT 2017
- obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*obj));
+ heap = GetProcessHeap();
+ obj = HeapAlloc(heap, HEAP_ZERO_MEMORY, sizeof(*obj));
I really hope we don't have to start optimizing for fewer GetProcessHeap calls.
+ /* Calculate space needed, including colon and potential
trailing space */
+ memoryNeeded = sizeof(WCHAR) *
(lstrlenW(cur->Element->LocalName) +
lstrlenW(cur->Element->Space->PreferredPrefix) + 2);
This doesn't account for the terminating NULL wsprintfW will add.
+ discoveredNamespaces = WSDAllocateLinkedMemory(NULL, sizeof(struct list));
+ if (!discoveredNamespaces) goto cleanup;
Why not allocate this on the stack?
More information about the wine-devel
mailing list