On 27/07/2017 22:11, Vincent Povirk wrote:
I really hope we don't have to start optimizing for fewer
GetProcessHeap calls.
I'll amend. :)
This doesn't account for the terminating NULL wsprintfW will add.
Thanks for catching that.
- discoveredNamespaces = WSDAllocateLinkedMemory(NULL,
sizeof(struct list));
- if (!discoveredNamespaces) goto cleanup;
Why not allocate this on the stack?
The discovered namespaces (and their child strings) are linked to the parent namespace (and ultimately the discoveredNamespaces list), simplifying cleanup.
Cheers,