mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
Do not loop if the next hook is null
This commit is contained in:
parent
a09790e4f2
commit
fe64c55afc
@ -45,7 +45,7 @@ namespace Driver
|
|||||||
for (size_t j = 0; j < sizeof(drv.InterruptHook) / sizeof(drv.InterruptHook[0]); j++)
|
for (size_t j = 0; j < sizeof(drv.InterruptHook) / sizeof(drv.InterruptHook[0]); j++)
|
||||||
{
|
{
|
||||||
if (!drv.InterruptHook[j])
|
if (!drv.InterruptHook[j])
|
||||||
continue;
|
break;
|
||||||
delete drv.InterruptHook[j], drv.InterruptHook[j] = nullptr;
|
delete drv.InterruptHook[j], drv.InterruptHook[j] = nullptr;
|
||||||
}
|
}
|
||||||
if (drv.MemTrk)
|
if (drv.MemTrk)
|
||||||
@ -70,7 +70,7 @@ namespace Driver
|
|||||||
for (size_t i = 0; i < sizeof(drv.InterruptHook) / sizeof(drv.InterruptHook[0]); i++)
|
for (size_t i = 0; i < sizeof(drv.InterruptHook) / sizeof(drv.InterruptHook[0]); i++)
|
||||||
{
|
{
|
||||||
if (!drv.InterruptHook[i])
|
if (!drv.InterruptHook[i])
|
||||||
continue;
|
break;
|
||||||
delete drv.InterruptHook[i], drv.InterruptHook[i] = nullptr;
|
delete drv.InterruptHook[i], drv.InterruptHook[i] = nullptr;
|
||||||
}
|
}
|
||||||
delete drv.MemTrk, drv.MemTrk = nullptr;
|
delete drv.MemTrk, drv.MemTrk = nullptr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user