quartz/tests: Fix memory leaks.

This commit is contained in:
Thomas Faber 2014-07-26 23:52:29 +02:00 committed by Alexandre Julliard
parent bab08e690e
commit cf45bec65b
2 changed files with 7 additions and 4 deletions

View File

@ -1884,6 +1884,7 @@ START_TEST(filtergraph)
skip("Creating filtergraph returned %08x, skipping tests\n", hr); skip("Creating filtergraph returned %08x, skipping tests\n", hr);
return; return;
} }
IGraphBuilder_Release(pgraph);
test_render_run(avifile); test_render_run(avifile);
test_render_run(mpegfile); test_render_run(mpegfile);
test_graph_builder(); test_graph_builder();

View File

@ -28,19 +28,21 @@
static void test_IReferenceClock_query_interface(const char * clockdesc, IReferenceClock * pClock) static void test_IReferenceClock_query_interface(const char * clockdesc, IReferenceClock * pClock)
{ {
HRESULT hr; HRESULT hr;
IUnknown *pF; void *pF;
hr = IReferenceClock_QueryInterface(pClock, &IID_IUnknown, (LPVOID *)&pF); hr = IReferenceClock_QueryInterface(pClock, &IID_IUnknown, &pF);
ok(hr == S_OK, "IReferenceClock_QueryInterface returned %x\n", hr); ok(hr == S_OK, "IReferenceClock_QueryInterface returned %x\n", hr);
ok(pF != NULL, "pF is NULL\n"); ok(pF != NULL, "pF is NULL\n");
if (SUCCEEDED(hr)) IUnknown_Release((IUnknown *)pF);
hr = IReferenceClock_QueryInterface(pClock, &IID_IDirectDraw, (LPVOID *)&pF); hr = IReferenceClock_QueryInterface(pClock, &IID_IDirectDraw, &pF);
ok(hr == E_NOINTERFACE, "IReferenceClock_QueryInterface returned %x\n", hr); ok(hr == E_NOINTERFACE, "IReferenceClock_QueryInterface returned %x\n", hr);
ok(pF == NULL, "pF is not NULL\n"); ok(pF == NULL, "pF is not NULL\n");
hr = IReferenceClock_QueryInterface(pClock, &IID_IReferenceClock, (LPVOID *)&pF); hr = IReferenceClock_QueryInterface(pClock, &IID_IReferenceClock, &pF);
ok(hr == S_OK, "IReferenceClock_QueryInterface returned %x\n", hr); ok(hr == S_OK, "IReferenceClock_QueryInterface returned %x\n", hr);
ok(pF != NULL, "pF is NULL\n"); ok(pF != NULL, "pF is NULL\n");
if (SUCCEEDED(hr)) IReferenceClock_Release((IReferenceClock *)pF);
} }
/* The following method expects a reference clock that will keep ticking for /* The following method expects a reference clock that will keep ticking for