[WINEALSA] close after free bug?

Robert Reif reif at earthlink.net
Sun May 21 12:03:33 CDT 2006


Robert Reif wrote:

> I can't test this patch but it looks wrong to free a device handle and 
> then close the device with the freed handle.
>
>------------------------------------------------------------------------
>
>Index: dlls/winmm/winealsa/audio.c
>===================================================================
>RCS file: /home/wine/wine/dlls/winmm/winealsa/audio.c,v
>retrieving revision 1.104
>diff -p -u -r1.104 audio.c
>--- dlls/winmm/winealsa/audio.c	10 May 2006 10:24:16 -0000	1.104
>+++ dlls/winmm/winealsa/audio.c	21 May 2006 12:21:23 -0000
>@@ -2692,8 +2692,8 @@ static DWORD wodClose(WORD wDevID)
> 
>         if (wwo->hctl)
>         {
>-            snd_hctl_free(wwo->hctl);
>             snd_hctl_close(wwo->hctl);
>+            snd_hctl_free(wwo->hctl);
>         }
> 	wwo->hctl = NULL;
> 
>  
>
>------------------------------------------------------------------------
>
>
>  
>
Please disregard this patch.  The functions don't do what I thought they do.




More information about the wine-devel mailing list