[Spice-devel] [PATCH spice-server 2/5] red-worker: Remove small memory leak

Christophe Fergeau cfergeau at redhat.com
Fri Aug 25 14:10:06 UTC 2017


Acked-by: Christophe Fergeau <cfergeau at redhat.com>

On Thu, Aug 24, 2017 at 03:37:17PM +0100, Frediano Ziglio wrote:
> If a DisplayChannelClient cannot be instantiated capabilities
> are not released correctly.
> 
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  server/red-worker.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/server/red-worker.c b/server/red-worker.c
> index 03a409cd..8fd964ea 100644
> --- a/server/red-worker.c
> +++ b/server/red-worker.c
> @@ -724,14 +724,13 @@ static void handle_dev_display_connect(void *opaque, void *payload)
>  
>      dcc = dcc_new(display, msg->client, msg->stream, msg->migration, &msg->caps,
>                    worker->image_compression, worker->jpeg_state, worker->zlib_glz_state);
> +    red_channel_capabilities_reset(&msg->caps);
>      if (!dcc) {
>          return;
>      }
>      display_channel_update_compression(display, dcc);
>      guest_set_client_capabilities(worker);
>      dcc_start(dcc);
> -
> -    red_channel_capabilities_reset(&msg->caps);
>  }
>  
>  static void handle_dev_display_disconnect(void *opaque, void *payload)
> -- 
> 2.13.5
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel


More information about the Spice-devel mailing list