Release cursor as soon as possible

Cursor resources (basically the shape of it) was retained till
it was used however it was copied so there were no reason to not release
this resource.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
Frediano Ziglio 2017-02-28 15:19:05 +00:00
parent bfb6601348
commit 1c6e7cf73e
2 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,6 @@ static void cursor_pipe_item_free(RedPipeItem *base)
RedCursorPipeItem *pipe_item = SPICE_UPCAST(RedCursorPipeItem, base);
cursor_cmd = pipe_item->red_cursor;
red_qxl_release_resource(pipe_item->qxl, cursor_cmd->release_info_ext);
red_put_cursor_cmd(cursor_cmd);
free(cursor_cmd);

View File

@ -112,6 +112,7 @@ static gboolean red_process_cursor_cmd(RedWorker *worker, const QXLCommandExt *e
free(cursor_cmd);
return FALSE;
}
red_qxl_release_resource(worker->qxl, cursor_cmd->release_info_ext);
cursor_channel_process_cmd(worker->cursor_channel, cursor_cmd);
return TRUE;
}