June 10, 2025
12:21 p.m.
Alexandre Julliard (@julliard) commented about dlls/kernelbase/memory.c:
+ (void) HeapUnlock( heap ); + return FALSE; + } + + if (!HeapUnlock( heap )) + return FALSE; + + heap_summary->cbAllocated = allocated; + heap_summary->cbCommitted = committed; + heap_summary->cbReserved = committed + uncommitted; + heap_summary->cbMaxReserve = heap_summary->cbReserved; + + /* restore previous last error on success to make it look + unchanged for the caller. */ + SetLastError(last_error); + return TRUE; Last error can be set at any point, it's not useful to preserve it unless an actual app depends on that behavior.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/8237#note_106034