Release the correct locks and release they in the correct sequence.
[reactos.git] / reactos / drivers / fs / np / fsctrl.c
index 1f5ba90..a148860 100644 (file)
@@ -208,12 +208,12 @@ NpfsDisconnectPipe(PNPFS_FCB Fcb)
       KeSetEvent(&OtherSide->WriteEvent, IO_NO_INCREMENT, FALSE);
       if (Server)
       {
-         ExReleaseFastMutex(&Fcb->DataListLock);
         ExReleaseFastMutex(&OtherSide->DataListLock);
+         ExReleaseFastMutex(&Fcb->DataListLock);
       }
       else
       {
-        ExReleaseFastMutex(&OtherSide->DataListLock);
+         ExReleaseFastMutex(&Fcb->DataListLock);
         ExReleaseFastMutex(&OtherSide->DataListLock);
       }
       Status = STATUS_SUCCESS;