[PATCH] strmbase: Release the allocator in IPin::Disconnect() (Valgrind).

Zebediah Figura z.figura12 at gmail.com
Sun Jun 7 16:24:11 CDT 2020


Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/strmbase/pin.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/dlls/strmbase/pin.c b/dlls/strmbase/pin.c
index f08c6d0186..e5017c2ff9 100644
--- a/dlls/strmbase/pin.c
+++ b/dlls/strmbase/pin.c
@@ -594,6 +594,13 @@ static HRESULT WINAPI source_Disconnect(IPin *iface)
             IMemInputPin_Release(This->pMemInputPin);
             This->pMemInputPin = NULL;
         }
+
+        if (This->pAllocator)
+        {
+            IMemAllocator_Release(This->pAllocator);
+            This->pAllocator = NULL;
+        }
+
         if (This->pin.peer)
         {
             IPin_Release(This->pin.peer);
@@ -930,6 +937,12 @@ static HRESULT WINAPI sink_Disconnect(IPin *iface)
         if (pin->pFuncsTable->sink_disconnect)
             pin->pFuncsTable->sink_disconnect(pin);
 
+        if (pin->pAllocator)
+        {
+            IMemAllocator_Release(pin->pAllocator);
+            pin->pAllocator = NULL;
+        }
+
         IPin_Release(pin->pin.peer);
         pin->pin.peer = NULL;
         FreeMediaType(&pin->pin.mt);
-- 
2.27.0




More information about the wine-devel mailing list