dlls/opengl32/wgl.c: minor dealloc fix

Nick Burns adger44 at hotmail.com
Mon Jan 1 17:54:06 CST 2007


According to...
    http://msdn2.microsoft.com/en-us/library/aa366701.aspx

lpMem
   [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...

- 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 mailing list