[Spice-commits] server/red-worker.c
Frediano Ziglio
fziglio at kemper.freedesktop.org
Fri Dec 4 04:03:23 PST 2015
server/red-worker.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 89fda203bcc2758560dafd6365900e001e254c12
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Thu Nov 26 12:25:46 2015 +0000
worker: improve validation for update command
If surface_id is not valid we should still release resource allocated
by red_get_update_cmd and from the guest.
This to reduce leaks in case of a race or another error in the guest
driver.
Also not issue a warning on invalid surface number to avoid filling
log space unconditionally.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Pavel Grunt <pgrunt at redhat.com>
diff --git a/server/red-worker.c b/server/red-worker.c
index 626b481..6ec9106 100644
--- a/server/red-worker.c
+++ b/server/red-worker.c
@@ -284,10 +284,10 @@ static int red_process_display(RedWorker *worker, uint32_t max_pipe_size, int *r
}
if (!validate_surface(worker->display_channel, update.surface_id)) {
spice_warning("Invalid surface in QXL_CMD_UPDATE");
- break;
+ } else {
+ display_channel_draw(worker->display_channel, &update.area, update.surface_id);
+ worker->qxl->st->qif->notify_update(worker->qxl, update.update_id);
}
- display_channel_draw(worker->display_channel, &update.area, update.surface_id);
- worker->qxl->st->qif->notify_update(worker->qxl, update.update_id);
release_info_ext.group_id = ext_cmd.group_id;
release_info_ext.info = update.release_info;
worker->qxl->st->qif->release_resource(worker->qxl, release_info_ext);
More information about the Spice-commits
mailing list