mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 21:45:41 +00:00
[KS] Cleanup in the failure path of KsCreateDefaultClock. Patch by Sebastian Gasiorek. CID 1322124 CORE-12784 #resolve #comment Thanks!
svn path=/trunk/; revision=73832
This commit is contained in:
parent
590c4dcc8c
commit
099a790594
1 changed files with 4 additions and 0 deletions
|
@ -395,7 +395,10 @@ KsCreateDefaultClock(
|
||||||
/* let's allocate the clock struct */
|
/* let's allocate the clock struct */
|
||||||
Clock = AllocateItem(NonPagedPool, sizeof(KSICLOCK));
|
Clock = AllocateItem(NonPagedPool, sizeof(KSICLOCK));
|
||||||
if (!Clock)
|
if (!Clock)
|
||||||
|
{
|
||||||
|
FreeItem(ClockCreate);
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
|
}
|
||||||
|
|
||||||
/* now allocate the object header */
|
/* now allocate the object header */
|
||||||
Status = KsAllocateObjectHeader((PVOID*)&Clock->ObjectHeader, 0, NULL, Irp, &DispatchTable);
|
Status = KsAllocateObjectHeader((PVOID*)&Clock->ObjectHeader, 0, NULL, Irp, &DispatchTable);
|
||||||
|
@ -404,6 +407,7 @@ KsCreateDefaultClock(
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
/* failed */
|
/* failed */
|
||||||
|
FreeItem(ClockCreate);
|
||||||
FreeItem(Clock);
|
FreeItem(Clock);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue