From c89d626d0e6ad4a384b4be5046cf4e376f2829df Mon Sep 17 00:00:00 2001 From: Murai Takashi Date: Tue, 16 Jun 2020 06:02:31 +0900 Subject: [PATCH] kernel/arch/x86: Fix PVS V773 Fix choose_link_device_configurations() was exited without releasing the 'link' pointer. Change-Id: I1620e63779975305776ffad717cbe2c07f4e022f Reviewed-on: https://review.haiku-os.org/c/haiku/+/2948 Reviewed-by: waddlesplash --- src/system/kernel/arch/x86/irq_routing_table.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/system/kernel/arch/x86/irq_routing_table.cpp b/src/system/kernel/arch/x86/irq_routing_table.cpp index 269041592d..f810ed0ae4 100644 --- a/src/system/kernel/arch/x86/irq_routing_table.cpp +++ b/src/system/kernel/arch/x86/irq_routing_table.cpp @@ -236,12 +236,14 @@ choose_link_device_configurations(acpi_module_info* acpi, link->possible_irqs); if (status != B_OK) { panic("failed to read possible irqs of link device"); + delete link; return status; } status = read_current_irq(acpi, link->handle, link->current_irq); if (status != B_OK) { panic("failed to read current irq of link device"); + delete link; return status; }