[Spice-devel,spice-server,06/20] Do not leak mig_timer

Submitted by Frediano Ziglio on Nov. 24, 2016, 5:38 p.m.

Details

Message ID 20161124173907.3341-7-fziglio@redhat.com
State Accepted
Commit 38ca3467bdb445cfae546388c7a2a575628b4408
Headers show
Series "Start cleaning objects on destruction" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Frediano Ziglio Nov. 24, 2016, 5:38 p.m.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
---
 server/reds.c | 4 ++++
 1 file changed, 4 insertions(+)

Patch hide | download patch | download mbox

diff --git a/server/reds.c b/server/reds.c
index 1a812e4..bc0cc01 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -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);