Author: janderwald
Date: Tue Jun 1 12:57:26 2010
New Revision: 47513
URL:
http://svn.reactos.org/svn/reactos?rev=47513&view=rev
Log:
[NPFS]
- Fix 2 memory leaks when creating a pipe fails
- Fix minor style issue
Modified:
trunk/reactos/drivers/filesystems/npfs/create.c
trunk/reactos/drivers/filesystems/npfs/rw.c
Modified: trunk/reactos/drivers/filesystems/npfs/create.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs/c…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs/create.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs/create.c [iso-8859-1] Tue Jun 1 12:57:26 2010
@@ -255,8 +255,9 @@
if (ClientCcb->Data)
{
ExFreePool(ClientCcb->Data);
- ClientCcb->Data = NULL;
}
+
+ ExFreePool(ClientCcb);
KeUnlockMutex(&Fcb->CcbListLock);
Irp->IoStatus.Status = STATUS_OBJECT_PATH_NOT_FOUND;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
@@ -273,6 +274,14 @@
else if (IsListEmpty(&Fcb->ServerCcbListHead))
{
DPRINT("No server fcb found!\n");
+
+ if (ClientCcb->Data)
+ {
+ ExFreePool(ClientCcb->Data);
+ }
+
+ ExFreePool(ClientCcb);
+
KeUnlockMutex(&Fcb->CcbListLock);
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
Modified: trunk/reactos/drivers/filesystems/npfs/rw.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs/r…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs/rw.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs/rw.c [iso-8859-1] Tue Jun 1 12:57:26 2010
@@ -163,7 +163,7 @@
ASSERT(FALSE);
}
KeLockMutex(&ThreadContext->DeviceExt->PipeListLock);
- Count = Status - STATUS_SUCCESS;
+ Count = Status - STATUS_WAIT_0;
ASSERT (Count < CurrentCount);
if (Count > 0)
{