From 6da4859903afea7c24e6d085e051cdbfbbd29e61 Mon Sep 17 00:00:00 2001 From: Scoopta Date: Fri, 19 Feb 2021 20:59:39 -0800 Subject: [PATCH] Fixed a memory leak when triggering the OSK --- src/wofi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wofi.c b/src/wofi.c index ee1c7cf..e9258df 100644 --- a/src/wofi.c +++ b/src/wofi.c @@ -1385,7 +1385,8 @@ static gboolean focus_entry(GtkWidget* widget, GdkEvent* event, gpointer data) { (void) data; if(widget == entry && dbus != NULL) { GError* err = NULL; - g_dbus_proxy_call_sync(dbus, "SetVisible", g_variant_new("(b)", event->focus_change.in), G_DBUS_CALL_FLAGS_NONE, 2000, NULL, &err); + GVariant* ret = g_dbus_proxy_call_sync(dbus, "SetVisible", g_variant_new("(b)", event->focus_change.in), G_DBUS_CALL_FLAGS_NONE, 2000, NULL, &err); + g_variant_unref(ret); if(err != NULL) { if(err->code != G_DBUS_ERROR_SERVICE_UNKNOWN) { fprintf(stderr, "Error while changing OSK state %s\n", err->message);