X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fiface-graphics-console.c;h=d47819c2dcf901d345f97a0f67bda30efe9e2be5;hb=a1e79c2d8ac8ae6ee326c207a83562e7de025ef8;hp=d05510a207df542203a22d2445e919213cf67edb;hpb=07aa8f3c18a33af0961e7546980a63ab5f6fba4f;p=palacios.git diff --git a/linux_module/iface-graphics-console.c b/linux_module/iface-graphics-console.c index d05510a..d47819c 100644 --- a/linux_module/iface-graphics-console.c +++ b/linux_module/iface-graphics-console.c @@ -254,7 +254,7 @@ static int palacios_graphics_console_key(struct v3_guest * guest, struct palacios_graphics_console *cons, uint8_t scancode) { - struct v3_keyboard_event e; + struct v3_keyboard_event e; e.status = 0; e.scan_code = scancode; @@ -271,11 +271,12 @@ static int palacios_graphics_console_mouse(struct v3_guest * guest, struct palacios_graphics_console *cons, uint8_t x, uint8_t y, uint8_t buttons) { + /* struct v3_mouse_event e; e.data[0]=x; e.data[1]=y; e.data[2]=buttons; // These three are completely wrong, of course - ignoring mouse for now - + */ // mouse delivery is broken, so don't do it. // v3_deliver_mouse_event(guest->v3_ctx,&e); @@ -309,9 +310,16 @@ static int graphics_console_init( void ) { static int graphics_console_deinit( void ) { + struct palacios_graphics_console * gc = NULL; + struct palacios_graphics_console * tmp = NULL; + + list_for_each_entry_safe(gc, tmp, &(global_gcons), gcons_node) { + list_del(&(gc->gcons_node)); + + if (gc->data) + vfree(gc->data); - if (!list_empty(&global_gcons)) { - ERROR("Removing graphics console with open consoles - MEMORY LEAK\n"); + palacios_free(gc); } return 0;