From a2f7562b30297efb9b41435025abed64da69b524 Mon Sep 17 00:00:00 2001 From: Volker Ruppert Date: Fri, 24 Nov 2023 21:47:41 +0100 Subject: [PATCH] Fixed two memory leaks in the Voodoo code. --- bochs/iodev/display/voodoo.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bochs/iodev/display/voodoo.cc b/bochs/iodev/display/voodoo.cc index b0c973909..ffc76a158 100644 --- a/bochs/iodev/display/voodoo.cc +++ b/bochs/iodev/display/voodoo.cc @@ -249,6 +249,7 @@ bx_voodoo_base_c::bx_voodoo_base_c() { put("VOODOO"); s.vertical_timer_id = BX_NULL_TIMER_HANDLE; + s.vga_tile_updated = NULL; v = NULL; } @@ -269,12 +270,16 @@ bx_voodoo_base_c::~bx_voodoo_base_c() bx_set_sem(&vertical_sem); bx_destroy_sem(&vertical_sem); } + if (s.vga_tile_updated != NULL) { + delete [] s.vga_tile_updated; + } if (v != NULL) { free(v->fbi.ram); if (s.model < VOODOO_BANSHEE) { free(v->tmu[0].ram); free(v->tmu[1].ram); } + delete [] v->thread_stats; delete v; }