From: Benjamin Otte Date: Sun, 16 Apr 2023 14:57:48 +0000 (+0200) Subject: testsuite: Fix broken test to not unref surfaces twice X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~4^2~10^2~7 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8178465c1a2adc81513c35d5d0419f092421c174;p=gtk4.git testsuite: Fix broken test to not unref surfaces twice The test doesn't hold 2 references, it holds only one. The reason one unref can cause a leak is that some backends - like X11 - only destroy the surface once the DestroyNotify event from the X server has come in. --- diff --git a/testsuite/gtk/shortcuts.c b/testsuite/gtk/shortcuts.c index 10a7913faa..f4895c5d2e 100644 --- a/testsuite/gtk/shortcuts.c +++ b/testsuite/gtk/shortcuts.c @@ -360,7 +360,6 @@ test_trigger_trigger (void) } gdk_surface_destroy (surface); - g_object_unref (surface); g_object_unref (trigger[0]); g_object_unref (trigger[1]);