[Spice-devel] [PATCH spice-gtk] spice-widget: update_monitor_area: Fix memory-leak on whole fallback

Marc-André Lureau mlureau at redhat.com
Fri Jan 18 18:35:46 PST 2013


ack
eh! I remember I saw that one, and forgot to fix it!

----- Mensaje original -----
> When we've successfully gotten the monitors display-channel property,
> but
> still end up falling back to whole-display mode, we still need to
> free
> the monitors array.
> 
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> ---
>  gtk/spice-widget.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
> index f1628d9..81670c3 100644
> --- a/gtk/spice-widget.c
> +++ b/gtk/spice-widget.c
> @@ -302,6 +302,7 @@ static void update_monitor_area(SpiceDisplay
> *display)
>      return;
>  
>  whole:
> +    g_clear_pointer(&monitors, g_array_unref);
>      /* by display whole surface */
>      update_area(display, 0, 0, d->width, d->height);
>      set_monitor_ready(display, true);
> --
> 1.8.0.2
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
> 


More information about the Spice-devel mailing list