[Spice-devel] [PATCH v5 4/8] Free main_dispatcher in spice_server_destroy

Jonathon Jongsma jjongsma at redhat.com
Mon Dec 5 20:55:30 UTC 2016


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


On Mon, 2016-12-05 at 12:16 +0000, Frediano Ziglio wrote:
> Avoid leaking it.
> 
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  server/reds.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/server/reds.c b/server/reds.c
> index 95295c8..d350331 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -3602,6 +3602,11 @@ SPICE_GNUC_VISIBLE void
> spice_server_destroy(SpiceServer *reds)
>          red_channel_destroy(RED_CHANNEL(reds->main_channel));
>      }
>      reds_core_timer_remove(reds, reds->mig_timer);
> +
> +    if (reds->main_dispatcher) {
> +        g_object_unref(reds->main_dispatcher);
> +    }
> +
>      reds_cleanup(reds);
>  #ifdef RED_STATISTICS
>      stat_file_free(reds->stat_file);


More information about the Spice-devel mailing list