mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-09 08:48:45 +00:00
Destroy pthread structures
Current Linux pthread implementation should use futex so there should be no leak but calling destroy avoid possible future leaks. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
parent
e6ed1840a1
commit
0434e66a37
@ -488,6 +488,7 @@ void image_encoders_free(ImageEncoders *enc)
|
||||
#endif
|
||||
zlib_encoder_destroy(enc->zlib);
|
||||
enc->zlib = NULL;
|
||||
pthread_mutex_destroy(&enc->glz_drawables_inst_to_free_lock);
|
||||
}
|
||||
|
||||
/* Remove from the to_free list and the instances_list.
|
||||
@ -820,6 +821,7 @@ static void image_encoders_release_glz(ImageEncoders *enc)
|
||||
ring_remove(&shared_dict->base);
|
||||
pthread_mutex_unlock(&glz_dictionary_list_lock);
|
||||
glz_enc_dictionary_destroy(shared_dict->dict, &enc->glz_data.usr);
|
||||
pthread_rwlock_destroy(&shared_dict->encode_lock);
|
||||
free(shared_dict);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user