Author: janderwald
Date: Sat Mar 21 09:33:34 2015
New Revision: 66846

URL: http://svn.reactos.org/svn/reactos?rev=66846&view=rev
Log:
[KS]
- try fix sound #1

Modified:
    trunk/reactos/drivers/ksfilter/ks/swenum.c

Modified: trunk/reactos/drivers/ksfilter/ks/swenum.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/swenum.c?rev=66846&r1=66845&r2=66846&view=diff
==============================================================================
--- trunk/reactos/drivers/ksfilter/ks/swenum.c  [iso-8859-1] (original)
+++ trunk/reactos/drivers/ksfilter/ks/swenum.c  [iso-8859-1] Sat Mar 21 
09:33:34 2015
@@ -690,7 +690,7 @@
     Length += 2;
 
     /* allocate buffer */
-    Buffer = AllocateItem(NonPagedPool, Length * sizeof(WCHAR));
+       Buffer = ExAllocatePoolWithTag(NonPagedPool, Length * sizeof(WCHAR), 
'mNoI');
     if (!Buffer)
     {
         /* no resources */
@@ -699,8 +699,9 @@
 
     /* construct buffer */
     swprintf(Buffer, L"%s\\%s", DeviceEntry->PDODeviceName, 
DeviceEntry->Instance);
-    // HACK
-    //ExFreePool(IoStack->FileObject->FileName.Buffer);
+
+    /* free old buffer*/
+    ExFreePoolWithTag(IoStack->FileObject->FileName.Buffer, 'mNoI');
 
     /* store new file name */
     RtlInitUnicodeString(&IoStack->FileObject->FileName, Buffer);
@@ -1228,8 +1229,14 @@
             }
             else if (DeviceEntry->DeviceState == Started)
             {
+                               /* release spin lock */
+                               KeReleaseSpinLock(&BusDeviceExtension->Lock, 
OldLevel);
+
                 /* found pending irps */
                 KspCompletePendingIrps(DeviceEntry, STATUS_REPARSE);
+
+                               /* re-acquire lock */
+                               KeAcquireSpinLock(&BusDeviceExtension->Lock, 
&OldLevel);
             }
         }
 


Reply via email to