From 4466230a853cd9115ec89553ea1c6897f50dbdf8 Mon Sep 17 00:00:00 2001 From: Frediano Ziglio Date: Wed, 10 Jun 2020 07:46:58 +0100 Subject: [PATCH] red-parse-qxl: Add a note on red_get_cursor Signed-off-by: Frediano Ziglio --- server/red-parse-qxl.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/red-parse-qxl.cpp b/server/red-parse-qxl.cpp index d71c261e..ac0d85bd 100644 --- a/server/red-parse-qxl.cpp +++ b/server/red-parse-qxl.cpp @@ -1566,6 +1566,10 @@ static bool red_get_cursor(RedMemSlotInfo *slots, int group_id, } else { red->data = (uint8_t*) g_memdup(data, size); } + // Arrived here we could note that we are not going to use anymore cursor data + // and we could be tempted to release resource back to QXL. Don't do that! + // If machine is migrated we will get cursor data back so we need to hold this + // data for migration return true; }