[Spice-devel] [spice-gtk] Fix 'monitors' leak in update_monitor_area()
Christophe Fergeau
cfergeau at redhat.com
Wed Nov 20 05:46:44 PST 2013
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
More information about the Spice-devel
mailing list