dlls/opengl32/wgl.c: minor dealloc fix
stefandoesinger at gmx.at
Mon Jan 1 18:06:07 CST 2007
Am 02.01.2007 um 00:54 schrieb Nick Burns:
> According to...
> [in] ...If this pointer is NULL, the behavior is undefined.
> I personally dislike undefined behaviour -- If it is defined to NOP
> in wine that is sufficent for me.
> But I think/tought I had a crash there tho...
I think we have a test case for that, as well as a test case for
allocation of 0 bytes. Not sure about the details though, but there
was a series of patches before to remove such checks.
> - Nick
>> From: Stefan Dösinger <stefandoesinger at gmx.at>
>> To: wine-devel at winehq.org
>> CC: Nick Burns <adger44 at hotmail.com>
>> Subject: Re: dlls/opengl32/wgl.c: minor dealloc fix
>> Date: Mon, 1 Jan 2007 22:33:49 +0100
>> Am 01.01.2007 um 11:03 schrieb Nick Burns:
>>> There can be a problem where the detach is hit before
>>> internal_gl_extensions is allocated and it tries to free NULL
>>> and dies...
>>> This just checks for the allocation before freeing -- very minor
>>> - Nick
>> HeapFree(GetProcessHeap(), 0, NULL) is supposed to be a nop, so
>> the check is not needed.
More information about the wine-devel