[virt-tools-list] [virt-viewer] Fix leak in virt_viewer_session_spice_clear_displays()

Pavel Grunt pgrunt at redhat.com
Tue Apr 7 09:55:55 UTC 2015


> 
> The GList returned by spice_session_get_channels() must be freed
> after
> use.
> ---
>  src/virt-viewer-session-spice.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/virt-viewer-session-spice.c
> b/src/virt-viewer-session-spice.c
> index a0acba6..49d224c 100644
> --- a/src/virt-viewer-session-spice.c
> +++ b/src/virt-viewer-session-spice.c
> @@ -102,6 +102,7 @@ static void
> virt_viewer_session_spice_clear_displays(VirtViewerSessionSpice *sel
>  
>          g_object_set_data(G_OBJECT(channel), "virt-viewer-displays",
>          NULL);
>      }
> +    g_list_free(channels);
>      virt_viewer_session_clear_displays(VIRT_VIEWER_SESSION(self));
>  }
>  
> --
> 2.3.4
>
 
Ack!

Thanks,

Pavel




More information about the virt-tools-list mailing list