mirror of
https://github.com/reactos/reactos.git
synced 2025-07-27 06:51:57 +00:00
[NPFS]
- Fix 2 memory leaks when creating a pipe fails - Fix minor style issue svn path=/trunk/; revision=47513
This commit is contained in:
parent
e2be367887
commit
ba2a17a2ef
2 changed files with 11 additions and 2 deletions
|
@ -255,8 +255,9 @@ NpfsCreate(PDEVICE_OBJECT DeviceObject,
|
||||||
if (ClientCcb->Data)
|
if (ClientCcb->Data)
|
||||||
{
|
{
|
||||||
ExFreePool(ClientCcb->Data);
|
ExFreePool(ClientCcb->Data);
|
||||||
ClientCcb->Data = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ExFreePool(ClientCcb);
|
||||||
KeUnlockMutex(&Fcb->CcbListLock);
|
KeUnlockMutex(&Fcb->CcbListLock);
|
||||||
Irp->IoStatus.Status = STATUS_OBJECT_PATH_NOT_FOUND;
|
Irp->IoStatus.Status = STATUS_OBJECT_PATH_NOT_FOUND;
|
||||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||||
|
@ -273,6 +274,14 @@ NpfsCreate(PDEVICE_OBJECT DeviceObject,
|
||||||
else if (IsListEmpty(&Fcb->ServerCcbListHead))
|
else if (IsListEmpty(&Fcb->ServerCcbListHead))
|
||||||
{
|
{
|
||||||
DPRINT("No server fcb found!\n");
|
DPRINT("No server fcb found!\n");
|
||||||
|
|
||||||
|
if (ClientCcb->Data)
|
||||||
|
{
|
||||||
|
ExFreePool(ClientCcb->Data);
|
||||||
|
}
|
||||||
|
|
||||||
|
ExFreePool(ClientCcb);
|
||||||
|
|
||||||
KeUnlockMutex(&Fcb->CcbListLock);
|
KeUnlockMutex(&Fcb->CcbListLock);
|
||||||
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
|
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
|
||||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||||
|
|
|
@ -163,7 +163,7 @@ NpfsWaiterThread(PVOID InitContext)
|
||||||
ASSERT(FALSE);
|
ASSERT(FALSE);
|
||||||
}
|
}
|
||||||
KeLockMutex(&ThreadContext->DeviceExt->PipeListLock);
|
KeLockMutex(&ThreadContext->DeviceExt->PipeListLock);
|
||||||
Count = Status - STATUS_SUCCESS;
|
Count = Status - STATUS_WAIT_0;
|
||||||
ASSERT (Count < CurrentCount);
|
ASSERT (Count < CurrentCount);
|
||||||
if (Count > 0)
|
if (Count > 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue