Module: wine Branch: master Commit: 38586dcf48bf38c136ea315fd9d83a1be56483b1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=38586dcf48bf38c136ea315fd9...
Author: Akihiro Sagawa sagawa.aki@gmail.com Date: Mon Dec 5 00:37:14 2016 +0900
winegstreamer: Fix reference leaks.
Signed-off-by: Akihiro Sagawa sagawa.aki@gmail.com Signed-off-by: Andrew Eikum aeikum@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/quartz/tests/filtergraph.c | 7 +++++++ dlls/winegstreamer/gstdemux.c | 4 ++++ 2 files changed, 11 insertions(+)
diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index 3077b38..9db1c72 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -366,6 +366,13 @@ static void test_render_run(const WCHAR *file) }
releasefiltergraph(); + + if (h != INVALID_HANDLE_VALUE) { + /* check reference leaks */ + h = CreateFileW(file, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL); + ok(h != INVALID_HANDLE_VALUE, "CreateFile failed: err=%d\n", GetLastError()); + CloseHandle(h); + } }
static void test_graph_builder(void) diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 03d8d5b..c33ed9e 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -1951,6 +1951,9 @@ static ULONG WINAPI GSTInPin_Release(IPin *iface) if (This->pAlloc) IMemAllocator_Release(This->pAlloc); This->pAlloc = NULL; + if (This->pReader) + IAsyncReader_Release(This->pReader); + This->pReader = NULL; This->pin.IPin_iface.lpVtbl = NULL; return 0; } else @@ -2048,6 +2051,7 @@ static HRESULT WINAPI GSTInPin_Disconnect(IPin *iface) if (SUCCEEDED(hr) && state == State_Stopped) { IMemAllocator_Decommit(This->pAlloc); IPin_Disconnect(This->pin.pConnectedTo); + IPin_Release(This->pin.pConnectedTo); This->pin.pConnectedTo = NULL; hr = GST_RemoveOutputPins(Parser); } else