On 20 June 2011 15:08, Vitaliy Margolen wine-devel@kievinfo.com wrote:
On 06/19/2011 08:15 PM, Austin Lund wrote:
- ret = wine_server_call( req );
- shi->Count += reply->handles;
- len = sizeof(SYSTEM_HANDLE_ENTRY)*shi->Count +
sizeof(ULONG);
- shi = RtlReAllocateHeap(GetProcessHeap(),
HEAP_ZERO_MEMORY, shi, len);
Please do allocations outside of server call block. And add handling of failed realloc. Also please double the allocated size, don't reallocate after each server call.
- for (i = shi->Count - reply->handles; i< shi->Count;
i++) {
- shi->Handle[i].OwnerPid = reply->pid;
- }
Please follow file's curly braces style - none for single line blocks, or on separate line for multi-line blocks.
Thanks for the review. Does this patch address these concerns correctly?