X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fiface-graphics-console.c;h=6744cfd5bcc04b279bebb89374758433873ae496;hb=0246f0904a4800dbe1e8e23332d49b468a58f751;hp=748c8b30a9e757f35eb3a2ca13c4d064c7cc2151;hpb=33e6f079afd41e2897ee382886c46ce12f374729;p=palacios.git diff --git a/linux_module/iface-graphics-console.c b/linux_module/iface-graphics-console.c index 748c8b3..6744cfd 100644 --- a/linux_module/iface-graphics-console.c +++ b/linux_module/iface-graphics-console.c @@ -22,7 +22,6 @@ #include "linux-exts.h" #include "vm.h" -#include /* @@ -107,7 +106,7 @@ static v3_graphics_console_t g_open(void * priv_data, DEBUG("palacios: allocating %u bytes for %u by %u by %u buffer\n", mem, desired_spec->width, desired_spec->height, desired_spec->bytes_per_pixel); - gc->data = vmalloc(mem); + gc->data = palacios_valloc(mem); if (!(gc->data)) { ERROR("palacios: unable to allocate memory for frame buffer\n"); @@ -149,7 +148,7 @@ static void g_close(v3_graphics_console_t cons) return; } if (gc->data) { - vfree(gc->data); + palacios_vfree(gc->data); gc->data=0; } } @@ -321,7 +320,7 @@ static int graphics_console_deinit( void ) { list_del(&(gc->gcons_node)); if (gc->data) - vfree(gc->data); + palacios_vfree(gc->data); palacios_free(gc); } @@ -476,10 +475,14 @@ static int graphics_console_guest_deinit(struct v3_guest * guest, void * vm_data list_del(&(graphics_cons->gcons_node)); + remove_guest_ctrl(guest, V3_VM_FB_INPUT); + remove_guest_ctrl(guest, V3_VM_FB_QUERY); + if (graphics_cons->data) { - vfree(graphics_cons->data); + palacios_vfree(graphics_cons->data); } + palacios_free(graphics_cons); return 0;