Commit b2d604a9 authored by Robert Reif's avatar Robert Reif Committed by Alexandre Julliard

dsound: Fix double free bug in tests.

Fix double free in tests. Only happens in interactive mode when testing duplicated 3D buffers.
parent 17f0fcc7
......@@ -466,7 +466,7 @@ static HRESULT test_primary(LPGUID lpGuid)
trace("All subsequent tones should be identical to this one.\n");
trace("Listen for stutter, changes in pitch, volume, etc.\n");
}
test_buffer(dso,primary,1,FALSE,0,FALSE,0,winetest_interactive &&
test_buffer(dso,&primary,1,FALSE,0,FALSE,0,winetest_interactive &&
!(dscaps.dwFlags & DSCAPS_EMULDRIVER),5.0,0,0,0,0,FALSE,0);
ref=IDirectSoundBuffer_Release(primary);
......@@ -601,7 +601,7 @@ static HRESULT test_primary_secondary(LPGUID lpGuid)
"buffer %s\n",DXGetErrorString8(rc));
if (rc==DS_OK && secondary!=NULL) {
test_buffer(dso,secondary,0,FALSE,0,FALSE,0,
test_buffer(dso,&secondary,0,FALSE,0,FALSE,0,
winetest_interactive,1.0,0,NULL,0,0,FALSE,0);
ref=IDirectSoundBuffer_Release(secondary);
......@@ -714,7 +714,7 @@ static HRESULT test_secondary(LPGUID lpGuid)
"buffer %s\n",DXGetErrorString8(rc));
if (rc==DS_OK && secondary!=NULL) {
test_buffer(dso,secondary,0,FALSE,0,FALSE,0,
test_buffer(dso,&secondary,0,FALSE,0,FALSE,0,
winetest_interactive,1.0,0,NULL,0,0,FALSE,0);
ref=IDirectSoundBuffer_Release(secondary);
......@@ -874,7 +874,7 @@ static HRESULT test_frequency(LPGUID lpGuid)
"buffer %s\n",DXGetErrorString8(rc));
if (rc==DS_OK && secondary!=NULL) {
test_buffer(dso,secondary,0,FALSE,0,FALSE,0,
test_buffer(dso,&secondary,0,FALSE,0,FALSE,0,
winetest_interactive,1.0,0,NULL,0,0,TRUE,rates[r]);
ref=IDirectSoundBuffer_Release(secondary);
......
......@@ -497,7 +497,7 @@ static HRESULT test_primary8(LPGUID lpGuid)
trace("All subsequent tones should be identical to this one.\n");
trace("Listen for stutter, changes in pitch, volume, etc.\n");
}
test_buffer8(dso,primary,1,FALSE,0,FALSE,0,winetest_interactive &&
test_buffer8(dso,&primary,1,FALSE,0,FALSE,0,winetest_interactive &&
!(dscaps.dwFlags & DSCAPS_EMULDRIVER),5.0,0,0,0,0);
ref=IDirectSoundBuffer_Release(primary);
......@@ -633,7 +633,7 @@ static HRESULT test_primary_secondary8(LPGUID lpGuid)
"buffer %s\n",DXGetErrorString8(rc));
if (rc==DS_OK && secondary!=NULL) {
test_buffer8(dso,secondary,0,FALSE,0,FALSE,0,
test_buffer8(dso,&secondary,0,FALSE,0,FALSE,0,
winetest_interactive,1.0,0,NULL,0,0);
ref=IDirectSoundBuffer_Release(secondary);
......@@ -746,7 +746,7 @@ static HRESULT test_secondary8(LPGUID lpGuid)
"buffer: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK && secondary!=NULL) {
test_buffer8(dso,secondary,0,FALSE,0,FALSE,0,
test_buffer8(dso,&secondary,0,FALSE,0,FALSE,0,
winetest_interactive,1.0,0,NULL,0,0);
ref=IDirectSoundBuffer_Release(secondary);
......
......@@ -53,10 +53,10 @@ static const unsigned int formats[][4]={
extern char* wave_generate_la(WAVEFORMATEX*,double,DWORD*);
extern HWND get_hwnd(void);
extern void init_format(WAVEFORMATEX*,int,int,int,int);
extern void test_buffer(LPDIRECTSOUND,LPDIRECTSOUNDBUFFER,
extern void test_buffer(LPDIRECTSOUND,LPDIRECTSOUNDBUFFER*,
BOOL,BOOL,LONG,BOOL,LONG,BOOL,double,BOOL,
LPDIRECTSOUND3DLISTENER,BOOL,BOOL,BOOL,DWORD);
extern void test_buffer8(LPDIRECTSOUND8,LPDIRECTSOUNDBUFFER,
extern void test_buffer8(LPDIRECTSOUND8,LPDIRECTSOUNDBUFFER*,
BOOL,BOOL,LONG,BOOL,LONG,BOOL,double,BOOL,
LPDIRECTSOUND3DLISTENER,BOOL,BOOL);
extern const char * getDSBCAPS(DWORD xmask);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment