[Spice-devel,v5,3/8] Free QXL instances in spice_server_destroy

Submitted by Frediano Ziglio on Dec. 5, 2016, 12:16 p.m.

Details

Message ID 8f167d252e62dda6bb71bf1875e2b46c75989949.1480940153.git-series.fziglio@redhat.com
State Accepted
Commit 492e59842a55847676a233aaa5d5c45c04f7195b
Headers show
Series "Start cleaning objects on destruction" ( rev: 7 ) in Spice

Not browsing as part of any series.

Commit Message

Frediano Ziglio Dec. 5, 2016, 12:16 p.m.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
---
 server/reds.c | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/server/reds.c b/server/reds.c
index 17e5ada..95295c8 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -3592,6 +3592,8 @@  SPICE_GNUC_VISIBLE void spice_server_destroy(SpiceServer *reds)
     servers = g_list_remove(servers, reds);
     pthread_mutex_unlock(&global_reds_lock);
 
+    g_list_free_full(reds->qxl_instances, (GDestroyNotify)red_qxl_destroy);
+
     if (reds->inputs_channel) {
         reds_unregister_channel(reds, RED_CHANNEL(reds->inputs_channel));
         red_channel_destroy(RED_CHANNEL(reds->inputs_channel));

Comments

Acked-by: Jonathon Jongsma <jjongsma@redhat.com>


On Mon, 2016-12-05 at 12:16 +0000, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
> ---
>  server/reds.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/server/reds.c b/server/reds.c
> index 17e5ada..95295c8 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -3592,6 +3592,8 @@ SPICE_GNUC_VISIBLE void
> spice_server_destroy(SpiceServer *reds)
>      servers = g_list_remove(servers, reds);
>      pthread_mutex_unlock(&global_reds_lock);
>  
> +    g_list_free_full(reds->qxl_instances,
> (GDestroyNotify)red_qxl_destroy);
> +
>      if (reds->inputs_channel) {
>          reds_unregister_channel(reds, RED_CHANNEL(reds-
> >inputs_channel));
>          red_channel_destroy(RED_CHANNEL(reds->inputs_channel));