Memleak fix: IRQ handler names were not deleted on simulation exit.
This commit is contained in:
parent
4a3e1cd545
commit
d63e048ec6
@ -2,7 +2,7 @@
|
||||
// $Id$
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002-2021 The Bochs Project
|
||||
// Copyright (C) 2002-2023 The Bochs Project
|
||||
//
|
||||
// I/O port handlers API Copyright (C) 2003 by Frank Cornelis
|
||||
//
|
||||
@ -142,11 +142,6 @@ void bx_devices_c::init(BX_MEM_C *newmem)
|
||||
write_port_to_handler[i] = &io_write_handlers;
|
||||
}
|
||||
|
||||
for (i=0; i < BX_MAX_IRQS; i++) {
|
||||
delete [] irq_handler_name[i];
|
||||
irq_handler_name[i] = NULL;
|
||||
}
|
||||
|
||||
// removable devices init
|
||||
for (i=0; i < 2; i++) {
|
||||
bx_keyboard[i].dev = NULL;
|
||||
@ -444,6 +439,10 @@ void bx_devices_c::exit()
|
||||
delete [] curr->handler_name;
|
||||
delete curr;
|
||||
}
|
||||
for (int i = 0; i < BX_MAX_IRQS; i++) {
|
||||
delete [] irq_handler_name[i];
|
||||
irq_handler_name[i] = NULL;
|
||||
}
|
||||
|
||||
bx_virt_timer.setup();
|
||||
bx_slowdown_timer.exit();
|
||||
|
Loading…
Reference in New Issue
Block a user