comctl32: realloc or free and alloc

Dan Kegel dank at kegel.com
Sun May 1 10:05:52 CDT 2011


On Sun, May 1, 2011 at 2:07 AM, Alexey Fisher
<bug-track at fisher-privat.net> wrote:
>> > The code looks like it assumes that pointer is always
>> > managed by Alloc/ReAlloc/Free.  In what context is
>> > the destination a fresh, non-Alloc'd pointer?
>> > Perhaps that's where the bug lies.
>>
>> We do not need to save anything what was in the target. Even the old
>> code ReAloocate it and then rewrite. In most contexts the pointer is a
>> fresh one. If it is not, it should be freed before this func.

I don't see why we should need to change the contract
so much.   Re-using existing blocks of memory isn't
the worst idea in the world.

> There is a new patch in the attachment.

It seems there's still some mystery in the code,
and that you don't fully understand it, so your
patch probably isn't right.
- Dan



More information about the wine-devel mailing list