cmd: Avoid rereading batch file for every call/goto executed (try 2)

Henri Verbeet hverbeet at gmail.com
Mon Sep 5 07:35:42 CDT 2011


2011/9/5 Frédéric Delanoy <frederic.delanoy at gmail.com>:
> +        keys = HeapAlloc(GetProcessHeap(), 0, capacity * sizeof(WCHAR*));
> +        vals = HeapAlloc(GetProcessHeap(), 0, capacity * sizeof(LARGE_INTEGER));
...
> +                    keys = HeapReAlloc(GetProcessHeap(), 0, keys,
> +                                       capacity * sizeof(WCHAR*));
> +                    vals = HeapReAlloc(GetProcessHeap(), 0, vals,
> +                                       capacity * sizeof(LARGE_INTEGER));
Memory allocations can fail. You also never free these, but I suppose
that happens implicitly on process termination.


More information about the wine-devel mailing list