diff --git a/graphics/vnc/server/vnc_server.h b/graphics/vnc/server/vnc_server.h index ef24920515..403a2d8465 100644 --- a/graphics/vnc/server/vnc_server.h +++ b/graphics/vnc/server/vnc_server.h @@ -90,7 +90,9 @@ struct vnc_session_s /* Display geometry and color characteristics */ uint8_t colorfmt; /* See include/nuttx/fb.h */ + uint8_t bpp; /* Bits per pixel */ struct nxgl_size_s screen; /* Size of the screen in pixels x rows */ + FAR uint8_t *fb; /* Allocated local frame buffer */ }; /**************************************************************************** diff --git a/graphics/vnc/server/vnc_session.c b/graphics/vnc/server/vnc_session.c index 16ec9ff846..3558993800 100644 --- a/graphics/vnc/server/vnc_session.c +++ b/graphics/vnc/server/vnc_session.c @@ -216,5 +216,12 @@ void vnc_release_session(FAR struct vnc_session_s *session) psock_close(&session->listen); } + /* Free the allocated framebuffer */ + + if (session->fb) + { + kmm_free(session->fb); + } + vnc_initialize_session(session); }