ole32: Allocate a small temp variable on the stack instead of the heap.
Andrew Eikum
aeikum at codeweavers.com
Tue Sep 28 15:56:53 CDT 2010
On 09/28/2010 03:43 PM, Michael Stefaniuc wrote:
> Smatch complained about a redundant NULL check of pfe before the
> HeapFree(). But there's a more important problem: the conditions to
> alloc and free pfe do not match which would free the pFormatEtc argument
> if renderopt != OLERENDER_DRAW.
I'm fairly certain the old code is safe in this regard; the only way for
pfe to be non-NULL and pFormatEtc to be NULL is for pfe to have been
alloced. This is really non-obvious, though, and your code is much more
clear. Thanks for the cleanup :)
Andrew
More information about the wine-patches
mailing list