From 7643a403f1d95025dd234859208c3d3f53c9daca Mon Sep 17 00:00:00 2001 From: Benjamin Schaaf Date: Fri, 12 Nov 2021 01:18:55 +1100 Subject: [PATCH] Fix memory leak when rotating device --- src/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.c b/src/main.c index c1124a9..e0b1bf5 100644 --- a/src/main.c +++ b/src/main.c @@ -819,6 +819,7 @@ static void display_config_received(GDBusConnection *conn, GAsyncResult *res, gp if (!result) { printf("Failed to get display configuration: %s\n", error->message); + g_object_unref(error); return; } @@ -839,6 +840,8 @@ static void display_config_received(GDBusConnection *conn, GAsyncResult *res, gp update_io_pipeline(); update_ui_rotation(); } + + g_variant_unref(result); } static void update_screen_rotation(GDBusConnection *conn)