mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-08 09:04:33 +00:00
Increment correctly reference before adding the item to marshaller
When the initial image was sent to the client the reference
was not incremented leading to some user after free.
This regression was introduced in
3bde2e570c
("DCC: remove more init_send_data() arguments").
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
This commit is contained in:
parent
1e1ed93ea7
commit
fe6ad8ba11
@ -2005,6 +2005,7 @@ static void red_marshall_image(RedChannelClient *rcc,
|
||||
|
||||
spice_marshall_Image(src_bitmap_out, &red_image,
|
||||
&bitmap_palette_out, &lzplt_palette_out);
|
||||
red_pipe_item_ref(&item->base);
|
||||
spice_marshaller_add_by_ref_full(src_bitmap_out, item->data,
|
||||
bitmap.y * bitmap.stride,
|
||||
marshaller_unref_pipe_item, item);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user