Author: janderwald
Date: Tue Aug 18 10:03:12 2009
New Revision: 42761
URL:
http://svn.reactos.org/svn/reactos?rev=42761&view=rev
Log:
- Increment reference count only if resource list was passed
- May fix A.8738-4C
Modified:
trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.c
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.c [iso-8859-1]
(original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.c [iso-8859-1] Tue Aug
18 10:03:12 2009
@@ -336,6 +336,13 @@
This->pDeviceObject = DeviceObject;
This->bInitialized = TRUE;
This->pResourceList = ResourceList;
+
+
+ if (ResourceList)
+ {
+ /* increment reference on resource list */
+ ResourceList->lpVtbl->AddRef(ResourceList);
+ }
Status = Miniport->lpVtbl->Init(Miniport, UnknownAdapter, ResourceList,
iface);
if (!NT_SUCCESS(Status))
@@ -397,10 +404,6 @@
This->pPowerNotify = PowerNotify;
}
- /* increment reference on resource list */
- ResourceList->lpVtbl->AddRef(ResourceList);
-
-
DPRINT("IPortWaveCyclic successfully initialized\n");
return STATUS_SUCCESS;
}