[Spice-devel] [spice-gtk] Fix 'monitors' leak in update_monitor_area()

Marc-André Lureau mlureau at redhat.com
Wed Nov 20 06:05:59 PST 2013


ack

----- Original Message -----
> This function has an early return where we fail to unref the 'monitors'
> array.
> ---
>  gtk/spice-widget.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
> index 0447dda..4e76648 100644
> --- a/gtk/spice-widget.c
> +++ b/gtk/spice-widget.c
> @@ -302,6 +302,7 @@ static void update_monitor_area(SpiceDisplay *display)
>          set_monitor_ready(display, false);
>          if (spice_channel_test_capability(d->display,
>          SPICE_DISPLAY_CAP_MONITORS_CONFIG)) {
>              SPICE_DEBUG("waiting until MonitorsConfig is received");
> +            g_clear_pointer(&monitors, g_array_unref);
>              return;
>          }
>          goto whole;
> --
> 1.8.4.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