[Spice-devel,v2,04/19] Use red_channel_destroy to free main_channel

Submitted by Frediano Ziglio on Nov. 25, 2016, 2:52 p.m.

Details

Message ID f602fadfd3f833a6599577e08d6c22396ae0b867.1480085518.git-series.fziglio@redhat.com
State New
Headers show
Series "Start cleaning objects on destruction" ( rev: 4 3 2 ) in Spice

Not browsing as part of any series.

Commit Message

Frediano Ziglio Nov. 25, 2016, 2:52 p.m.
This will close all clients and release the channel properly

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
---
 server/reds.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/server/reds.c b/server/reds.c
index c5e84ec..1a812e4 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -3590,7 +3590,7 @@  SPICE_GNUC_VISIBLE void spice_server_destroy(SpiceServer *reds)
     g_array_unref(reds->config->video_codecs);
     free(reds->config);
     if (reds->main_channel) {
-        main_channel_close(reds->main_channel);
+        red_channel_destroy(RED_CHANNEL(reds->main_channel));
     }
     reds_cleanup(reds);
 

Comments

On Fri, 2016-11-25 at 14:52 +0000, Frediano Ziglio wrote:
> This will close all clients and release the channel properly
> 
> Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
> ---
>  server/reds.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/server/reds.c b/server/reds.c
> index c5e84ec..1a812e4 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -3590,7 +3590,7 @@ SPICE_GNUC_VISIBLE void
> spice_server_destroy(SpiceServer *reds)
>      g_array_unref(reds->config->video_codecs);
>      free(reds->config);
>      if (reds->main_channel) {
> -        main_channel_close(reds->main_channel);
> +        red_channel_destroy(RED_CHANNEL(reds->main_channel));
>      }
>      reds_cleanup(reds);
>