"Muneyuki Noguchi" nogu.dev@gmail.com wrote:
Changes from the previous patch:
- Add a new variable STRSIZE.
A define would be better IMO, or just use 64 directly, 2 places don't justify the introduction of it.
- Use HeapAlloc() and HeapFree() instead of malloc() and free().
I'd suggest to have an initial buffer of 64 bytes allocated on the stack, and allocate a larger buffer only if required. That improves performance.
- Return from a function when (re)allocation failed.
You have to call wine_tsx11_unlock() when needed on exit.