mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-30 17:49:02 +00:00
dcc: Use spice_new instead of spice_malloc
spice_new return directly the correct type. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
parent
da4a0fbe03
commit
cd631b5819
@ -177,7 +177,7 @@ static RedSurfaceCreateItem *red_surface_create_item_new(RedChannel* channel,
|
||||
{
|
||||
RedSurfaceCreateItem *create;
|
||||
|
||||
create = spice_malloc(sizeof(RedSurfaceCreateItem));
|
||||
create = spice_new(RedSurfaceCreateItem, 1);
|
||||
|
||||
create->surface_create.surface_id = surface_id;
|
||||
create->surface_create.width = width;
|
||||
@ -692,7 +692,7 @@ static RedSurfaceDestroyItem *red_surface_destroy_item_new(RedChannel *channel,
|
||||
{
|
||||
RedSurfaceDestroyItem *destroy;
|
||||
|
||||
destroy = spice_malloc(sizeof(RedSurfaceDestroyItem));
|
||||
destroy = spice_new(RedSurfaceDestroyItem, 1);
|
||||
destroy->surface_destroy.surface_id = surface_id;
|
||||
red_pipe_item_init(&destroy->pipe_item, RED_PIPE_ITEM_TYPE_DESTROY_SURFACE);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user