Do not leak mig_timer

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
This commit is contained in:
Frediano Ziglio 2016-11-18 12:45:49 +00:00
parent af58d24f9b
commit 38ca3467bd

View File

@ -3594,6 +3594,10 @@ SPICE_GNUC_VISIBLE void spice_server_destroy(SpiceServer *reds)
}
reds_cleanup(reds);
if (reds->mig_timer) {
reds_core_timer_remove(reds, reds->mig_timer);
}
/* remove the server from the list of servers so that we don't attempt to
* free it again at exit */
pthread_mutex_lock(&global_reds_lock);