[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: [PATCH (try 2)] dsound: Copy SetFormat format more directly if we're not in PRIMARYWRITE mode
From:       Andrew Eikum <aeikum () codeweavers ! com>
Date:       2013-05-29 12:31:38
Message-ID: 20130529123138.GZ3605 () foghorn ! codeweavers ! com
[Download RAW message or body]

On Wed, May 29, 2013 at 01:10:56PM +0200, Maarten Lankhorst wrote:
> NAK.
> 
> +		HeapFree(GetProcessHeap(), 0, device->primary_pwfx);
> +		device->primary_pwfx = DSOUND_CopyFormat(passed_fmt);
> Copy to a tmp buffer first and return E_OUTOFMEMORY instead of reassigning primary_pwfx to NULL?
> 

CopyFormat will only return NULL if HeapAlloc fails (actually,
CopyFormat will probably crash). I've stopped caring about out of
memory conditions since they add way too much error handling code and
we can't reasonably recover from them anyway.

Andrew


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic