https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7db9fb3ba6d798f7ab294…
commit 7db9fb3ba6d798f7ab2946aa83bd6bb75aa3f88d
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Tue Feb 15 08:40:20 2022 -0500
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Tue Feb 15 08:43:08 2022 -0500
[PORTCLS] Don't leak CPortWaveCyclic.
---
drivers/wdm/audio/backpln/portcls/port_wavecyclic.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/wdm/audio/backpln/portcls/port_wavecyclic.cpp
b/drivers/wdm/audio/backpln/portcls/port_wavecyclic.cpp
index f7c0afcb30c..cb54dcc275b 100644
--- a/drivers/wdm/audio/backpln/portcls/port_wavecyclic.cpp
+++ b/drivers/wdm/audio/backpln/portcls/port_wavecyclic.cpp
@@ -33,7 +33,7 @@ public:
InterlockedDecrement(&m_Ref);
if (!m_Ref)
{
- //delete this;
+ delete this;
return 0;
}
return m_Ref;
@@ -41,7 +41,7 @@ public:
IMP_IPortWaveCyclic;
IMP_ISubdevice;
IMP_IPortEvents;
- CPortWaveCyclic(IUnknown *OuterUnknown){}
+ CPortWaveCyclic(IUnknown *OuterUnknown) : m_Ref(0) {}
virtual ~CPortWaveCyclic(){}
protected: