mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 14:41:25 +00:00
take the right lock when freeing glz stuff of surfaces
this was noticed by Yonit. Signed-off-by: Izik Eidus <ieidus@redhat.com>
This commit is contained in:
parent
34fb3f6806
commit
03fb4e05be
@ -1799,14 +1799,14 @@ static void red_clear_surface_glz_drawables(RedWorker *worker, int surface_id)
|
||||
return;
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&worker->display_channel->glz_drawables_inst_to_free_lock);
|
||||
pthread_rwlock_wrlock(&worker->display_channel->glz_dict->encode_lock);
|
||||
|
||||
while ((ring_item = ring_get_head(&worker->surfaces[surface_id].glz_drawables))) {
|
||||
RedGlzDrawable *now = SPICE_CONTAINEROF(ring_item, RedGlzDrawable, surface_link);
|
||||
red_display_free_glz_drawable(worker->display_channel, now);
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&worker->display_channel->glz_drawables_inst_to_free_lock);
|
||||
pthread_rwlock_unlock(&worker->display_channel->glz_dict->encode_lock);
|
||||
}
|
||||
|
||||
static void red_clear_surface_drawables_from_pipe(RedWorker *worker, int surface_id)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user