GUACAMOLE-1114: Merge fix the destruction of some thread mutexes

This commit is contained in:
Virtually Nick 2020-06-26 14:19:39 -05:00 committed by GitHub
commit c10ceab7e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -46,7 +46,14 @@ guac_common_clipboard* guac_common_clipboard_alloc(int size) {
} }
void guac_common_clipboard_free(guac_common_clipboard* clipboard) { void guac_common_clipboard_free(guac_common_clipboard* clipboard) {
/* Destroy lock */
pthread_mutex_destroy(&(clipboard->lock));
/* Free buffer */
free(clipboard->buffer); free(clipboard->buffer);
/* Free base structure */
free(clipboard); free(clipboard);
} }

View File

@ -631,6 +631,9 @@ void guac_rdp_print_job_free(guac_rdp_print_job* job) {
/* Wait for job to terminate */ /* Wait for job to terminate */
pthread_join(job->output_thread, NULL); pthread_join(job->output_thread, NULL);
/* Destroy lock */
pthread_mutex_destroy(&(job->state_lock));
/* Free base structure */ /* Free base structure */
free(job); free(job);