diff options
author | Yonit Halperin <yhalperi@redhat.com> | 2011-06-15 17:21:02 +0300 |
---|---|---|
committer | Yonit Halperin <yhalperi@redhat.com> | 2011-07-12 09:01:45 +0300 |
commit | 00086b8898ad9527aba72d3b4348e8892de42eba (patch) | |
tree | 5e0841d6fc1d8547d8dfc41d66df04c4329cb134 | |
parent | 686b67473f30043033deeaf0f1eb644915d792cd (diff) | |
download | spice-00086b8898ad9527aba72d3b4348e8892de42eba.tar.gz spice-00086b8898ad9527aba72d3b4348e8892de42eba.tar.xz spice-00086b8898ad9527aba72d3b4348e8892de42eba.zip |
server: add missing calls to red_handle_drawable_surfaces_client_synced
red_handle_drawable_surfaces_client_synced was called only from red_pipe_add_drawable, while it
should also be called from red_pipe_add_drawable_after. Otherwise, the client
might receive a command with a reference to a surface it doesn't hold and crash.
-rw-r--r-- | server/red_worker.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/server/red_worker.c b/server/red_worker.c index 672f0781..bfb3cf96 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -1194,6 +1194,7 @@ static inline void red_pipe_add_drawable_to_tail(RedWorker *worker, Drawable *dr if (!worker->display_channel) { return; } + red_handle_drawable_surfaces_client_synced(worker, drawable); drawable->refs++; red_pipe_add_tail(&worker->display_channel->common.base, &drawable->pipe_item); } @@ -1209,6 +1210,7 @@ static inline void red_pipe_add_drawable_after(RedWorker *worker, Drawable *draw red_pipe_add_drawable(worker, drawable); return; } + red_handle_drawable_surfaces_client_synced(worker, drawable); drawable->refs++; red_channel_pipe_add_after(&worker->display_channel->common.base, &drawable->pipe_item, &pos_after->pipe_item); } |